File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Run Tests and Check Coverage
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+
8+ jobs :
9+ test :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ # Checkout the code
14+ - name : Checkout repository
15+ uses : actions/checkout@v3
16+
17+ # Set up Node.js
18+ - name : Set up Node.js
19+ uses : actions/setup-node@v3
20+ with :
21+ node-version : " 18"
22+
23+ # Cache yarn dependencies (optional but speeds up the process)
24+ - name : Cache yarn dependencies
25+ uses : actions/cache@v3
26+ with :
27+ path : ~/.cache/yarn
28+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
29+ restore-keys : |
30+ ${{ runner.os }}-yarn-
31+
32+ # Install dependencies with yarn
33+ - name : Install dependencies with yarn
34+ run : yarn install
35+
36+ # Run tests
37+ - name : Run tests
38+ run : yarn test
39+
40+ # Run coverage
41+ - name : Run coverage
42+ run : yarn coverage
43+
44+ # Upload coverage results (using Coveralls or another service)
45+ - name : Upload coverage to coveralls
46+ uses : coverallsapp/github-action@v2
47+ with :
48+ github-token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments