Refactor cube moves #43
Workflow file for this run
This file contains hidden or 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 and Lint check | |
| on: | |
| push: | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_call: | |
| jobs: | |
| build: | |
| name: Build Package | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.11", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set environment variables | |
| id: set_env_variables | |
| run: echo "PYTHONPATH=." >> "$GITHUB_ENV" | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Check autopep8 compliance | |
| run: autopep8 --exit-code --diff --recursive . | |
| - name: Check pylint compliance | |
| run: pylint . | |
| - name: Check mypy compliance | |
| run: mypy magiccube | |
| - name: Test with pytest | |
| run: | | |
| pip install pytest | |
| pytest test/ --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-${{ matrix.python-version }} | |
| path: junit/test-results-${{ matrix.python-version }}.xml | |
| if: ${{ always() }} |