|
4 | 4 | workflow_call: |
5 | 5 |
|
6 | 6 | jobs: |
7 | | - # Lint the code |
8 | | - feature-lint: |
9 | | - name: "Feature / Lint" |
10 | | - runs-on: ubuntu-latest |
11 | | - permissions: |
12 | | - packages: read |
13 | | - contents: read |
14 | | - steps: |
15 | | - - uses: actions/checkout@v4 |
16 | | - - uses: MatrixAI/.github/.github/actions/install-nix |
17 | | - - name: Run linting |
18 | | - run: | |
19 | | - nix develop .#ci --command bash -c $' |
20 | | - npm run lint |
21 | | - ' |
22 | 7 |
|
23 | | - # Build the dist |
24 | | - feature-build: |
25 | | - name: "Feature / Build" |
26 | | - runs-on: ubuntu-latest |
27 | | - permissions: |
28 | | - packages: read |
29 | | - contents: read |
30 | | - actions: write |
31 | | - steps: |
32 | | - - uses: actions/checkout@v4 |
33 | | - - uses: MatrixAI/.github/.github/actions/install-nix |
34 | | - - name: Run build |
35 | | - run: | |
36 | | - nix develop .#ci --command bash -c $' |
37 | | - npm run build --verbose |
38 | | - ' |
39 | | - - name: Upload Build |
40 | | - uses: actions/upload-artifact@v4 |
41 | | - with: |
42 | | - name: dist |
43 | | - path: ./dist |
44 | | - |
45 | | - # Test the dist |
46 | | - feature-test: |
47 | | - name: "Feature / Test" |
48 | | - runs-on: ubuntu-latest |
49 | | - permissions: |
50 | | - packages: read |
51 | | - contents: read |
52 | | - actions: write |
53 | | - checks: write |
54 | | - steps: |
55 | | - - uses: actions/checkout@v4 |
56 | | - - uses: MatrixAI/.github/.github/actions/install-nix |
57 | | - - name: Run tests |
58 | | - run: | |
59 | | - nix develop .#ci --command bash -c $' |
60 | | - npm run test -- --ci --coverage |
61 | | - ' |
62 | | - - name: Upload JUnit report |
63 | | - if: success() || failure() |
64 | | - uses: actions/upload-artifact@v4 |
65 | | - with: |
66 | | - name: junit-report |
67 | | - path: tmp/junit/junit.xml |
68 | | - - name: Publish JUnit Report |
69 | | - uses: mikepenz/action-junit-report@v5 |
70 | | - with: |
71 | | - report_paths: tmp/junit/junit.xml |
72 | | - - name: Upload Cobertura report |
73 | | - if: success() || failure() |
74 | | - uses: actions/upload-artifact@v4 |
75 | | - with: |
76 | | - name: coverage-report |
77 | | - path: tmp/coverage/cobertura-coverage.xml |
78 | | - |
79 | | - # Bench the dist |
80 | | - feature-bench: |
81 | | - name: "Feature / Bench" |
82 | | - runs-on: ubuntu-latest |
83 | | - permissions: |
84 | | - packages: read |
85 | | - contents: read |
86 | | - actions: write |
87 | | - steps: |
88 | | - - uses: actions/checkout@v4 |
89 | | - - uses: MatrixAI/.github/.github/actions/install-nix |
90 | | - - name: Run bench |
91 | | - run: | |
92 | | - nix develop .#ci --command bash -c $' |
93 | | - npm run bench --if-present |
94 | | - ' |
95 | | - - name: Upload Bench |
96 | | - uses: actions/upload-artifact@v4 |
97 | | - with: |
98 | | - name: metrics-report |
99 | | - path: ./benches/results/metrics.txt |
100 | | - if-no-files-found: ignore |
0 commit comments