-
Notifications
You must be signed in to change notification settings - Fork 12
89 lines (74 loc) · 2.09 KB
/
tests.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Run Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
ssh_enabled:
type: boolean
description: 'Run the build with ssh debugging enabled (/~https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.12]
steps:
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
detached: true
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Checkout repository
uses: actions/checkout@v2
- name: Install apt packages
uses: tecolicom/actions-use-apt-tools@v1
with:
# expect provides "unbuffer"
tools: expect
method: timestamp
- name: Install wasi-sdk
run: |
cd
WASI_OS=linux
WASI_ARCH=x86_64
WASI_VERSION=24
WASI_VERSION_FULL=${WASI_VERSION}.0
WASI_FILENAME=wasi-sdk-${WASI_VERSION_FULL}-${WASI_ARCH}-${WASI_OS}
wget -q /~https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}/${WASI_FILENAME}.tar.gz
tar xf ${WASI_FILENAME}.tar.gz
$PWD/${WASI_FILENAME}/bin/clang --version
echo "$PWD/${WASI_FILENAME}/bin" >> $GITHUB_PATH
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Display versions
run: |
echo PATH="$PATH"
echo
echo python && python --version && echo
echo pip && pip --version && echo
echo clang && clang --version && echo
echo gcc && gcc --version && echo
- name: Install project
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Build libspy
run: |
cd spy/libspy
make
- name: Run tests
run: |
pytest -m "not mypy"
- name: Run mypy
run: |
mypy