-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.12 KB
/
python-linting.yml
File metadata and controls
44 lines (38 loc) · 1.12 KB
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
name: Python Linting, Test and Upload
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.7", "3.10"]
steps:
- uses: actions/checkout@v2
# Setup Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install Task
- name: Install Task
run: sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d
# Cached venv
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
# Install pip and poetry
- name: Install and upgrade pip and poetry
run: |
python -m pip install --upgrade pip poetry
# Install dependencies through task
- name: Install Dependencies
run: |
./bin/task install
# Run our linting
- name: Lint code
run: |
./bin/task lint