-
Notifications
You must be signed in to change notification settings - Fork 32
96 lines (81 loc) · 2.74 KB
/
packages.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
name: Typescript Packages
on:
pull_request:
paths:
- 'packages/**'
push:
paths:
- 'packages/**'
jobs:
cancel-outdated:
name: Cancel Outdated Jobs
runs-on: ubuntu-latest
steps:
- id: skip_check
if: ${{ format('refs/heads/{0}', github.event.repository.default_branch) != github.ref && !contains(github.event.head_commit.message, '[no_skip]') }}
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: 'true'
lint:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: 'recursive'
- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs
# Foundry is required for formatting
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run tests # Run tests of all packages
run: npx lerna exec npm run ci:lint --parallel
test:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: 'recursive'
- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs
- name: Verify Changed files
uses: tj-actions/[email protected]
id: verify-yarn-lock
with:
files: |
yarn.lock
- name: Add Label
if: ${{ steps.verify-yarn-lock.outputs.files_changed == 'true' && github.event_name != 'push' }}
uses: ./.github/actions/add-label
with:
label: 'needs-yarn-install'
- name: Remove Label
if: ${{ steps.verify-yarn-lock.outputs.files_changed != 'true' && github.event_name != 'push' }}
uses: ./.github/actions/remove-label
with:
label: 'needs-yarn-install'
- name: List all changed files tracked and untracked files
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
echo "Changed files: ${{ steps.verify-changed-files.outputs.changed_files }}"
- name: Run tests # Run tests of all packages
run: yarn test:coverage
- name: LCOV move
run: mv lcov/lcov.info lcov.info
- name: Send Coverage (Codecov)
uses: Wandalen/[email protected]
with:
action: codecov/codecov-action@v3
with: |
token: ${{ secrets.CODECOV }}
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
flags: packages
files: lcov.info
attempt_limit: 5
attempt_delay: 30000