-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (73 loc) · 2.26 KB
/
ci.yaml
File metadata and controls
76 lines (73 loc) · 2.26 KB
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
75
76
name: CI
on:
push:
branches:
- main
pull_request:
env:
APP_NAME: "NX-powered Applications"
jobs:
main:
name: Merged
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
- name: Setup node modules
uses: actions/setup-node@v3
- name: Install dependencies
run: npm install
- name: Install Playwright
run: npx playwright install --with-deps
- name: Run code format check
run: npm run format:check
- name: Run Svelte type check
run: npm run check
- name: Run lint
run: npm run lint
- name: Run build
run: npm run build
- name: Run test
run: npm run test
- name: Run e2e
run: npm run e2e:backend
- name: Send test coverage
uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm run test:coverage
coverageLocations: ${{github.workspace}}/coverage/**/*/lcov.info:lcov
pr:
name: Pull Request
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
- name: Setup node modules
uses: actions/setup-node@v3
- name: Install dependencies && npx playwright install-deps
run: npm install
- name: Run affected code format check
run: npm run format:check:affected
- name: Run affected Svelte type check
run: npm run check:affected
- name: Run affected lint
run: npm run lint:affected
- name: Run affected build
run: npm run build:affected
- name: Run affected test
run: npm run test:affected
- name: Run affected e2e
run: npm run e2e:backend:affected