Skip to content

Commit

Permalink
chore: Improve actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bn3t committed Oct 15, 2024
1 parent 913aa22 commit 04679a7
Showing 1 changed file with 44 additions and 10 deletions.
54 changes: 44 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: CI Workflow

on:
push:
branches:
- main
pull_request:
types: [assigned, opened, synchronize, reopened, labeled]
name: ci
branches:
- '*'

permissions:
contents: read # to fetch code (actions/checkout)

Expand All @@ -13,13 +16,44 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [20]
node-version: [14, 16, 18, 20]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run linter
run: npm run lint

- name: Run tests
run: npm test

build:
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm install -g npm@10
- run: node --version
- run: npm ci
- run: npm run test
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build

0 comments on commit 04679a7

Please sign in to comment.