forked from refined-github/refined-github
-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (117 loc) · 3.6 KB
/
test.yml
File metadata and controls
126 lines (117 loc) · 3.6 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
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
119
120
121
122
123
124
125
126
name: Test
on:
pull_request:
branches:
- '*'
push:
branches:
- main
- 'test/*'
jobs:
Security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npx lockfile-lint --path package-lock.json --validate-https
Vitest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: npm
- run: sudo apt-get install ripgrep
- run: npm ci
- run: npm run vitest -- --exclude 'build/features*' --exclude '**/selectors*'
- run: npm run vitest -- selectors
# For some reason it fails on CI, but not locally
# Mentioned in https://github.com/refined-github/refined-github/issues/7747
if: false
continue-on-error: true
Verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: npm
- run: npm ci
- run: npm run vitest -- build/features
- name: Leave comment
uses: peter-evans/create-or-update-comment@v4
if: failure() && github.event_name == 'pull_request' && github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Don't worry about fixing this yet, you can wait for the feature to be finalized before documenting it.
FYI: you can run `npm run fix` to automatically fix a lot of issues and update snapshots. Similar tips can be found in the [contributing wiki](https://github.com/refined-github/refined-github/wiki/Contributing).
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: npm
- run: npm ci
- run: npm run lint
- uses: codespell-project/actions-codespell@v2
with:
ignore_words_list: eror,usera
exclude_file: ${{ github.workspace }}/package-lock.json
skip: '*.json'
Types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: npm
- run: npm ci
- run: npm run build:typescript
Build:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: npm
- run: npm ci
- run: npm run build:bundle
env:
RELATIVE_CI_STATS: true
- name: Upload bundle stats artifact
if: matrix.os == 'ubuntu-latest'
uses: relative-ci/agent-upload-artifact-action@v2
with:
webpackStatsFile: ./distribution/assets/webpack-stats.json
- uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest'
with:
name: refined-github
path: |
distribution
!./distribution/assets/webpack-stats.json
Safari:
# Disabled because it's a waste of time
if: false
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: npm
- run: npm ci
- run: npm run build:bundle
- uses: maxim-lobanov/setup-xcode@v1
- run: npm run pack:safari