Cleanup and fix datafile accessions #190
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.13"] | |
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]' | |
pip install keyring keyrings.alt | |
working-directory: ${{ env.working-directory }} | |
- name: Test python code | |
env: | |
PYTHON_KEYRING_BACKEND: keyrings.alt.file.PlaintextKeyring | |
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: Create mypy cache directory | |
run: mkdir -p /tmp/mypy_cache | |
- name: Type checking | |
run: mypy --install-types --non-interactive --cache-dir /tmp/mypy_cache mars_lib/ | |
working-directory: ${{ env.working-directory }} |