Skip to content

Commit eb1df22

Browse files
committed
ci: configure self-hosted CI
1 parent f65c37f commit eb1df22

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/sh-test.yml renamed to .github/workflows/self-hosted-ci.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
name: sh-test
1+
name: ci-tests
22
on:
3-
push:
4-
workflow_dispatch:
3+
push:
4+
pull_request:
5+
branches: [master, main, develop]
6+
workflow_dispatch:
7+
58
jobs:
69
lint:
710
name: Lint
@@ -12,6 +15,7 @@ jobs:
1215
uses: './.github/actions/cached-npm-install'
1316
- name: Run linter
1417
run: npm run lint
18+
1519
specs:
1620
name: Unit tests
1721
runs-on: self-hosted
@@ -23,25 +27,38 @@ jobs:
2327
run: npm test
2428
env:
2529
CI: true
30+
2631
e2e:
2732
name: End-to-end tests
2833
runs-on: self-hosted
2934
steps:
3035
- uses: actions/checkout@v4
3136
- name: Install
3237
uses: './.github/actions/cached-npm-install'
38+
- name: Cache Playwright browsers
39+
uses: actions/cache@v3
40+
with:
41+
path: ~/.cache/ms-playwright
42+
key: playwright-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
3343
- name: Run e2e tests
3444
continue-on-error: false
3545
run: |
3646
npx playwright test -c e2e/e2e.config.ts
3747
env:
3848
CI: true
49+
3950
build:
4051
name: Build
52+
needs: [lint, specs, e2e]
4153
runs-on: self-hosted
4254
steps:
4355
- uses: actions/checkout@v4
4456
- name: Install
4557
uses: './.github/actions/cached-npm-install'
4658
- name: Build package
4759
run: npm run build:pkg
60+
- name: Upload build artifact
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: ngx-uploadx-package
64+
path: dist/

0 commit comments

Comments
 (0)