-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (37 loc) · 1.03 KB
/
CI.yaml
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: Check format lint and test
on:
push:
branches: [ main ]
pull_request:
env:
python-version: "3.10"
permissions:
contents: read
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: 'Set up Python ${{ inputs.python-version }}'
with:
python-version: ${{ env.python-version }}
- uses: actions/cache@v4
id: cache-venv
with:
path: ./.venv/
key: ${{ runner.os }}-venv-${{ hashFiles('**/dev-requirements.txt') }}
restore-keys: |
${{ runner.os }}-venv-
- name: 'Create Virtualenv and install Dependencies'
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
python -m venv .venv
source .venv/bin/activate
pip install -r dev-requirements.txt
- name: "lint-check & test"
run: |
source .venv/bin/activate
poe lint-check
poe test