-
-
Notifications
You must be signed in to change notification settings - Fork 4
69 lines (66 loc) · 2.11 KB
/
ci_eslint_and_test.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
# This file configure a GitHub workflow responsible to perform
# various checks related to the codebase.
#
# For that reason it's runned on every pull request and push to main.
#
# It does the following:
# - Check linting passes (no eslint error on files)
# - Run tests and ensure none is failing
name: core
on:
push:
branches:
- main
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#patterns-to-match-file-paths
paths-ignore:
- "**/README.md"
- "**/md/**"
- "**/docs/**"
- "**/packages/independent/workflow/**"
pull_request:
branches:
- "**"
paths-ignore:
- "**/README.md"
- "**/md/**"
- "**/docs/**"
- "**/packages/independent/workflow/**"
jobs:
test:
strategy:
matrix:
os: [ubuntu-20.04, macos-12, windows-2022] # https://github.com/actions/runner-images
node: [22.3.0]
runs-on: ${{ matrix.os }}
name: test on ${{ matrix.os }} and node ${{ matrix.node }}
env:
CI: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: set linux fs limits
if: runner.os == 'Linux'
run: |
sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p
sudo sh -c "ulimit -n 65536 && exec su $LOGNAME"
ulimit -n
# sudo ulimit should prevent npm link failure
- name: Install node modules
run: npm install
- name: Install playwright
run: npx playwright install-deps
- name: Install certificate # needed for @jsenv/service-worker tests
if: runner.os == 'Linux' # https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
run: node ./scripts/test/certificate_install.mjs
- name: Fix lightningcss windows
if: runner.os == 'Windows'
run: npm install lightningcss-win32-x64-msvc
- name: Run ESLint
run: npm run eslint
- name: Run core tests
run: npm test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}