Fix docker compose and GitHub actions #6
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: | |
runs-on: ubuntu-latest | |
env: | |
working-directory: ./mars-cli | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
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 --doctest-modules --cov=mars_lib tests/ --cov-fail-under=80 | |
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 }} |