-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (48 loc) · 1.43 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
name: Test
on:
push:
branches: [main, issue-*]
pull_request:
branches: [main, issue-*]
jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Import GPG key used for testing
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.TEST_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.TEST_PASSPHRASE }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true
- name: Setup Python
uses: actions/setup-python@v2.3.1
with:
python-version: "3.9"
- name: Setup Libvips
run: |
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y libvips-dev
- name: Setup Poetry
run: pip3 install poetry
- name: Check Poetry
run: poetry --version
- name: Config Poetry for Cache
if: ${{ !env.ACT }}
run: poetry config virtualenvs.in-project true
- name: Cache the virtualenv
if: ${{ !env.ACT }}
uses: actions/cache@v2.1.6
with:
path: ./.venv
key: ${{ runner.os }}-venv-v0-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
- name: Install via Poetry
run: poetry install
- name: Run Pytest Test
run: poetry run pytest --cov