-
Notifications
You must be signed in to change notification settings - Fork 8
118 lines (109 loc) · 3.21 KB
/
ci.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: CI
on:
workflow_dispatch:
pull_request:
branches: [main]
jobs:
audit:
name: Audit
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/install
- name: Audit Dependencies
# when a vulnerability is found that fails the build, try to use
# `pnpm audit --fix` which will override version within
# package.json#pnpm.overrides to patched version.
# Second, use package.json#pnpm.auditConfig.ignoreCves if harmless.
run: pnpm audit --audit-level moderate
license-check:
name: License Check
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/install
- name: Check Licenses
run: pnpm license-check
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/install
- name: Compile TypeScript
run: pnpm build
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/install
- name: Lint
run: pnpm lint
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/install
- name: Test
run: pnpm test
# TODO: only run on infra change
# gboost-create-tests:
# needs: unit-tests
# name: gboost-create-tests
# runs-on: ubuntu-latest
# strategy:
# matrix:
# scenario: [0]
# permissions:
# id-token: write
# contents: read
# steps:
# - name: Checkout Repo
# uses: actions/checkout@v3
# - name: Install
# uses: ./.github/actions/install
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
# aws-region: us-east-1
# role-session-name: GitHubActionSession
# - name: gboost-create-tests
# run: cd packages/gboost && pnpm test:gboost-create --scenario ${{ matrix.scenario }}
# TODO: only run on infra change
# gboost-create-test-windows:
# needs: unit-tests
# name: gboost-create-test-windows
# runs-on: windows-latest
# permissions:
# id-token: write
# contents: read
# steps:
# - name: Checkout Repo
# uses: actions/checkout@v3
# - name: Install
# uses: ./.github/actions/install
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
# aws-region: us-east-1
# role-session-name: GitHubActionSession
# - name: gboost-create-tests-windows
# run: cd packages/gboost && pnpm test:gboost-create --scenario 0
# stops workflows in progress if a new commit is added to PR
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true