More contribs client patches (#1095) #2885
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: testing | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: ["ubuntu-latest"] | |
| python-version: ["3.12", "3.13", "3.14"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade "pip<25.3" | |
| pip install -r requirements/requirements-${{ matrix.os }}_py${{ matrix.python-version }}_extras.txt | |
| pip install -e . --no-deps | |
| - name: Set SSL_CERT_FILE (Linux) | |
| if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
| run: echo "SSL_CERT_FILE=$(python -m certifi)" >> $GITHUB_ENV | |
| - name: Set SSL_CERT_FILE (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: echo "SSL_CERT_FILE=$(python -m certifi)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Lint with mypy | |
| shell: bash -l {0} | |
| run: python -m mypy mp_api/ | |
| - name: Test with pytest | |
| if: always() | |
| env: | |
| MP_API_KEY: ${{ secrets.MP_API_KEY_UBUNTU_LATEST_3_12 }} | |
| # MP_API_ENDPOINT: https://api-preview.materialsproject.org/ | |
| run: | | |
| pytest -n auto -x --cov=mp_api --cov-report=xml | |
| - uses: codecov/codecov-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./coverage.xml |