-
-
Notifications
You must be signed in to change notification settings - Fork 36
92 lines (83 loc) · 2.6 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
name: CI
on:
push:
branches:
- '*'
pull_request:
branches:
- 'main'
schedule:
- cron: '0 0 * * *'
env:
NX_CLOUD_DISTRIBUTED_EXECUTION: true
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_TOKEN }}
jobs:
main:
name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/[email protected]
with:
node-version: '20'
parallel-commands-on-agents: |
pnpm nx affected --target=lint --parallel=3
pnpm nx affected --target=test --parallel=3
pnpm nx affected --target=build --parallel=3 --exclude=docs
NODE_NO_WARNINGS=1 pnpm exec nx affected --target=e2e --skip-nx-cache
report-coverage:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && github.repository == 'jmcdo29/ogma' && github.actor == 'jmcdo29' }}
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install pnpm
run: npm i -g pnpm@^8
- name: Install deps
run: pnpm i
- name: Collect Test Coverage
run: NX_CLOUD_DISTRIBUTED_EXECUTION=false NODE_NO_WARNINGS=1 pnpm nx run tools:collect --skip-nx-cache
- name: Send Test Coverage:with
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage/lcov.info
shell: bash
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ['javascript']
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
auto-merge:
needs: main
if: (contains(github.event.pull_request.user.login, 'dependabot') || contains(github.event.pull_request.user.login, 'renovate')) && github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: automerge
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
MERGE_LABELS: ''
MERGE_METHOD: rebase
agents:
name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/[email protected]
with:
number-of-agents: 3
node-version: '20'