Skip to content

Commit 1108386

Browse files
authored
Merge pull request #722 from davidalvarezp/patch-1
refactor(ci): simplify and standardize GitHub Actions workflow
2 parents 522530a + 7428a34 commit 1108386

1 file changed

Lines changed: 33 additions & 17 deletions

File tree

.github/workflows/actions.yaml

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,55 @@
1-
name: GitHub Actions
1+
name: CI
22

33
on:
44
pull_request:
55
branches:
66
- main
7+
78
push:
89
branches:
910
- main
1011

12+
permissions:
13+
contents: read
14+
1115
jobs:
12-
build:
16+
check:
17+
name: Check
1318
runs-on: ubuntu-latest
14-
strategy:
15-
matrix:
16-
node-version:
17-
- 22
19+
1820
steps:
19-
- uses: actions/checkout@v4
20-
- name: Use Node.js v${{ matrix.node-version }}
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
2125
uses: actions/setup-node@v4
2226
with:
23-
node-version: ${{ matrix.node-version }}
27+
node-version: 22
2428
cache: npm
25-
- run: npm ci
26-
- run: npm run build
27-
# - run: npm test
2829

29-
check:
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Run checks
34+
run: npm run check
35+
36+
build:
37+
name: Build
38+
needs: check
3039
runs-on: ubuntu-latest
40+
3141
steps:
32-
- uses: actions/checkout@v4
33-
- name: Use Node.js 22
42+
- name: Checkout repository
43+
uses: actions/checkout@v4
44+
45+
- name: Setup Node.js
3446
uses: actions/setup-node@v4
3547
with:
3648
node-version: 22
3749
cache: npm
38-
- run: npm ci
39-
- run: npm run check
50+
51+
- name: Install dependencies
52+
run: npm ci
53+
54+
- name: Build application
55+
run: npm run build

0 commit comments

Comments
 (0)