generated from alan-turing-institute/ARC-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 833 Bytes
/
actions.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
name: Run linters and tests
on:
pull_request:
branches:
- main
- develop
push:
branches:
- main
- develop
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: poetry install
- name: Lint
run: |
poetry run black --check --diff .
poetry run isort --check-only --diff .
poetry run flake8
- name: Run tests
if: github.repository != 'alan-turing-institute/ARC-project-template'
run: poetry run pytest