-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (42 loc) · 1.21 KB
/
test-mars.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
46
47
48
name: Test MARS
on:
push:
paths:
- "mars-cli/**"
pull_request:
paths:
- "mars-cli/**"
branches:
- main
workflow_dispatch:
jobs:
test-mars:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
env:
working-directory: ./mars-cli
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/setup.py'
- run: pip install -e '.[test]'
working-directory: ${{ env.working-directory }}
- name: Test python code
run: pytest
working-directory: ${{ env.working-directory }}
- name: Formatting
run: black --check mars_lib/
working-directory: ${{ env.working-directory }}
- name: Linting
run: ruff check mars_lib/
working-directory: ${{ env.working-directory }}
- name: Type checking
run: mypy --install-types --non-interactive mars_lib/
working-directory: ${{ env.working-directory }}