-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (63 loc) · 1.84 KB
/
spa-server-ci.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI
on:
push:
branches:
- 'master'
- 'develop_*'
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
check_server: ${{ steps.filter.outputs.check_server }}
check_js_client: ${{ steps.filter.outputs.check_js_client }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
check_server:
- 'client/**'
- 'server/**'
- 'Cargo.lock'
check_js_sdk:
- 'jsclient/**'
check_server:
needs: changes
if: ${{ needs.changes.outputs.check_server == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- name: run integration test
# --show-output
run: cargo test -p tests --test http_test -j 1 -- --test-threads 1
- name: run pebble
run: ./run_pebble.sh
working-directory: ./tests/bash/
- name: run acme integration test
run: cargo test -p tests --test acme_test -j 1 -- --test-threads 1
- name: run spa-client test
run: cargo test -p spa-client -j 1 -- --test-threads 1
- name: run spa-server test
run: cargo test -p spa-server
check_js_client:
needs: changes
if: ${{ needs.changes.outputs.check_js_client == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
cache-dependency-path: './jsclient/package-lock.json'
- run: npm ci && npm run build