-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (41 loc) · 1.27 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
if: github.repository_owner == 'Apicurio'
steps:
- name: Set up npm
uses: actions/setup-node@v4
with:
node-version: 18
- name: Checkout
uses: actions/checkout@v3
- name: Dependencies
run: |
npm install
- name: Compile
run: |
npm run compile
- name: Run Registry
run: |
echo "REGISTRY_CID=$(docker run -d -p 8080:8080 quay.io/apicurio/apicurio-registry-mem:2.5.x-snapshot)" >> "$GITHUB_ENV"
- name: Test
run: |
xvfb-run -a npm run test
- name: Clean test artifacts
run: |
rm *.vsix
- name: Stop Registry
run: |
docker stop "$REGISTRY_CID"
# - name: Setup tmate session
# if: failure()
# uses: mxschmitt/action-tmate@v3
# TODO: Save test artifacts: "Screenshots of failures can be found in: /tmp/test-resources/screenshots"