-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (50 loc) · 1.43 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build and Test
on:
pull_request:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [18.x, 20.x]
command: ['lint', 'format', 'build']
steps:
- uses: actions/checkout@v4
- name: Set Up node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: 'yarn'
- name: Install dependencies
run: yarn --immutable --immutable-cache
- name: Run ${{ matrix.command }}
run: yarn ${{ matrix.command }}
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Set Up node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'yarn'
- name: Install dependencies
run: yarn --immutable --immutable-cache
- name: Log in to the GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run integration tests
run: yarn test:docker
env:
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}