generated from ShigureLab/python-lib-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.16 KB
/
unit-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
name: Unit Test
on: [push, pull_request, workflow_dispatch]
jobs:
unit-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
architecture: ['x64']
name: Python ${{ matrix.python-version }} on ${{ matrix.architecture }} test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Install poetry
uses: snok/install-poetry@v1
- name: Install just
uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v3
id: poetry-cache
with:
path: |
**/.venv
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.architecture }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
if: steps.poetry-cache.outputs.cache-hit != 'true'
run: |
just install
- name: unit test
run: |
just ci-test