File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ # This file is copied from https://github.com/source-academy/js-slang/blob/master/.github/workflows/nodejs.yml
2+ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
3+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
4+
5+ name : Node.js CI
6+
7+ on :
8+ push :
9+ branches :
10+ [ "main" ]
11+ pull_request :
12+ branches :
13+ [ "main" ]
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+
19+ strategy :
20+ matrix :
21+ node-version : [18.x, 20.x, 22.x]
22+ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
23+
24+ steps :
25+ - name : Checkout repository
26+ uses : actions/checkout@v4
27+ with :
28+ submodules : recursive
29+ - name : Check for package-lock.json
30+ run : |
31+ if [ -e package-lock.json ]; then
32+ echo "package-lock.json found; please do not use NPM! This project uses Yarn!"
33+ exit 1
34+ fi
35+ exit 0
36+ - name : Install dependencies (apt)
37+ run : |
38+ sudo apt-get update && \
39+ sudo apt-get install -y --no-install-recommends \
40+ texlive texlive-fonts-extra texlive-lang-cjk latexmk latex-cjk-all
41+ # Has to be run before actions/setup-node.
42+ # See: https://github.com/actions/setup-node/issues/480
43+ - name : Enable corepack for Yarn
44+ run : corepack enable
45+ - name : Setup Node ${{ matrix.node-version }}
46+ uses : actions/setup-node@v4
47+ with :
48+ node-version : ${{ matrix.node-version }}
49+ cache : yarn
50+ - run : yarn install --immutable
51+ - run : yarn build
52+ - run : yarn format:ci
53+ - run : yarn eslint
54+ - run : yarn test-coverage
55+ env :
56+ CI : true
You can’t perform that action at this time.
0 commit comments