Skip to content

Commit bf6f1f3

Browse files
committed
WIP
1 parent 7ce9f8a commit bf6f1f3

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/library-js-feature.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
workflow_call:
55

66
jobs:
7+
# Lint the code
78
check-lint:
89
name: "Check / Lint"
910
runs-on: ubuntu-latest
@@ -17,3 +18,49 @@ jobs:
1718
npm run lint
1819
'
1920
21+
# Test the code
22+
check-test:
23+
name: "Check / Test"
24+
runs-on: ubuntu-latest
25+
container:
26+
image: ghcr.io/matrixai/github-runner
27+
steps:
28+
- uses: actions/checkout@v4
29+
- name: Run tests
30+
run: |
31+
nix develop .#ci --command bash -c $'
32+
npm run test -- --ci --coverage
33+
'
34+
- name: Upload JUnit report
35+
if: success() || failure()
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: junit-report
39+
path: tmp/junit/junit.xml
40+
- name: Publish JUnit Report
41+
uses: mikepenz/action-junit-report@v5
42+
with:
43+
report_paths: tmp/junit/junit.xml
44+
- name: Upload Cobertura report
45+
if: success() || failure()
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: coverage-report
49+
path: tmp/coverage/cobertura-coverage.xml
50+
51+
# Build the code
52+
check-build:
53+
name: "Check / Build"
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
- name: Run build
58+
run: |
59+
nix develop .#ci --command bash -c $'
60+
npm run build --verbose
61+
'
62+
- name: Upload Build
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: dist
66+
path: ./dist

0 commit comments

Comments
 (0)