-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 897 Bytes
/
Copy pathci.yml
File metadata and controls
42 lines (35 loc) · 897 Bytes
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
name: CI
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install dependencies
run: |
set -euo pipefail
REQ_FILE="requirements-lock.txt"
if [ ! -f "$REQ_FILE" ]; then REQ_FILE="requirements.txt"; fi
python -m pip install --upgrade pip
python -m pip install -r "$REQ_FILE"
python -m pip install ruff
- name: Run ruff
run: |
set -euo pipefail
ruff check .
- name: Run unit tests
run: |
set -euo pipefail
python -m unittest discover -s tests -v