forked from vlaci/openconnect-sso
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (63 loc) · 2.04 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
70
71
72
73
74
name: Tests
on:
push:
branches:
- master
- develop
pull_request:
branches:
- '**'
jobs:
tests:
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [Ubuntu]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get full Python version
id: full-python-version
shell: bash
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
pip-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-
pip-${{ runner.os }}-
- name: Virtualenv cache
uses: actions/cache@v2
id: cache-venv
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('poetry.lock') }}
- name: Update make
if: startsWith(runner.os, 'macOS')
run: |
brew install make
echo 'export PATH=/usr/local/opt/make/libexec/gnubin:$PATH' >> ~/.bash_profile
- name: Bootstrap
shell: bash
run: |
# For mac
[[ -f ~/.bash_profile ]] && source ~/.bash_profile
python -m ensurepip
python -m pip install --upgrade pip pre-commit poetry
make PRECOMMIT=n dev
sudo apt update
sudo apt install libegl1
- name: Run pytest
shell: bash
run: make test