-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 1.53 KB
/
test.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
67
68
69
name: Unit Tests
on:
push:
branches: [ main ]
paths:
- 'src/**'
- 'lib/**'
- '.github/workflows/test.yml'
pull_request:
types: [assigned, opened, synchronize, reopened]
paths:
- 'src/**'
- 'lib/**'
- '.github/workflows/test.yml'
jobs:
build_wasm:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Docker Setup Buildx
uses: docker/[email protected]
- name: Build
working-directory: ./lib/
run: docker run -v `pwd`:/src ubuntu:focal-20220113 /bin/bash /src/build-lib.sh
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: wasm
path: ./lib/wasi-lab/qjs-wasi/build/qjs.wasm
run_unittests:
needs: build_wasm
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
dotnet: [6.0.x]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: wasm
path: ./lib/wasi-lab/qjs-wasi/build
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Build projects
working-directory: ./src/
run: dotnet build
- name: Run unit tests
working-directory: ./src/
run: dotnet test