-
Notifications
You must be signed in to change notification settings - Fork 272
74 lines (63 loc) · 1.74 KB
/
workers.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
62
63
64
65
66
67
68
69
70
71
72
73
74
name: "Workers"
on:
push:
branches: [ '**' ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
node-version: [ 18, 20 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/workflows/actions/setup
with:
node-version: ${{ matrix.node-version }}
- shell: bash
run: pnpm install
--include-workspace-root
--frozen-lockfile
--filter=workers...
--filter=webapp-emails...
- name: Build emails renderer
shell: bash
run: pnpm nx run webapp-emails:build
- name: Build
shell: bash
run: pnpm nx run workers:build
test:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [ 18, 20 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/workflows/actions/setup
with:
node-version: ${{ matrix.node-version }}
- shell: bash
run: pnpm install
--include-workspace-root
--frozen-lockfile
--filter=workers...
- name: Lint workers
shell: bash
run: pnpm nx run workers:lint
- name: Test workers
shell: bash
run: pnpm nx run workers:test
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
if: env.SONAR_ORGANIZATION != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_ORGANIZATION: ${{ vars.SONAR_ORGANIZATION }}
SONAR_WORKERS_PROJECT_KEY: ${{ vars.SONAR_WORKERS_PROJECT_KEY }}
with:
projectBaseDir: packages/workers