Skip to content

Commit 25d9af1

Browse files
committed
chore: require tests to run before deployment
1 parent 68dc61c commit 25d9af1

3 files changed

Lines changed: 25 additions & 17 deletions

File tree

.github/workflows/build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "Build"
2+
on:
3+
pull_request:
4+
branches:
5+
- develop
6+
jobs:
7+
build:
8+
name: Build
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version-file: '.nvmrc'
15+
- run: npm ci
16+
- run: npm run synth

.github/workflows/deploy.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
name: Build & Deploy
1+
name: Deploy
22

33
on:
4-
push:
4+
workflow_run:
5+
workflows: [Lint and Test]
6+
types:
7+
- completed
58
branches:
69
- main
710
- develop
811

912
jobs:
1013
deploy:
14+
name: Deploy
1115
runs-on: ubuntu-latest
1216
concurrency: ${{ github.ref_name == 'main' && 'Production' || 'Staging' }}
1317
environment: ${{ github.ref_name == 'main' && 'Production' || 'Staging' }}
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
name: "Lint & Build PR"
1+
name: Lint and Test
22
on:
33
pull_request:
4-
branches:
5-
- main
6-
- develop
4+
75
jobs:
86
lint-test:
9-
name: Lint & Test
7+
name: Lint and Test
108
runs-on: ubuntu-latest
119
steps:
1210
- uses: actions/checkout@v4
@@ -29,13 +27,3 @@ jobs:
2927
uses: codecov/codecov-action@v5
3028
with:
3129
files: coverage.out
32-
build:
33-
name: Build
34-
runs-on: ubuntu-latest
35-
steps:
36-
- uses: actions/checkout@v4
37-
- uses: actions/setup-node@v4
38-
with:
39-
node-version-file: '.nvmrc'
40-
- run: npm ci
41-
- run: npm run synth

0 commit comments

Comments
 (0)