-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (44 loc) · 1.22 KB
/
ci.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
on:
push:
branches: [ main ]
pull_request:
jobs:
ci:
strategy:
matrix:
task: [test, lint, format]
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
qemu-user \
clang-15 lld-15 \
libc6-armhf-cross libc6-arm64-cross \
libc6-mips-cross libc6-mips64-cross \
libc6-powerpc-cross libc6-powerpc-ppc64-cross
- name: Install Package
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pytest ruff black isort
python3 -m pip install -e .
- name: Run pytest
if: matrix.task == 'test'
run: |
python3 -m pytest
- name: Run formatter
if: matrix.task == 'format'
run: |
python3 -m isort . --profile black --check-only --diff
python3 -m black . --check
- name: Run linter
if: matrix.task == 'lint'
run: |
python3 -m ruff check .