Merge pull request #1119 from materialsproject/dependabot/github_acti… #2491
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: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'docs/CHANGELOG.md' | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 1 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.11 | |
| cache: pip | |
| - name: Run pre-commit | |
| run: | | |
| pip install pre-commit | |
| pre-commit run --all-files | |
| test: | |
| needs: lint | |
| services: | |
| local_mongodb: | |
| image: mongo:5.0 | |
| ports: | |
| - 27017:27017 | |
| azurite: | |
| image: mcr.microsoft.com/azure-storage/azurite | |
| ports: | |
| - 10000:10000 | |
| strategy: | |
| max-parallel: 6 | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ["3.11", "3.12", "3.13"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements/${{ matrix.os }}_py${{ matrix.python-version }}_extras.txt | |
| - name: Test with pytest | |
| env: | |
| CONTINUOUS_INTEGRATION: True | |
| MONGODB_SRV_URI: ${{ secrets.MONGODB_SRV_URI }} | |
| run: | | |
| pip install -e . | |
| pytest --cov=maggma --cov-report=xml | |
| - uses: codecov/codecov-action@v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./coverage.xml | |
| test-min-deps: | |
| needs: lint | |
| services: | |
| local_mongodb: | |
| image: mongo:5.0 | |
| ports: | |
| - 27017:27017 | |
| strategy: | |
| max-parallel: 3 | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ["3.11", "3.12", "3.13"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install minimum dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[testing]" | |
| - name: Test with pytest (minimum dependencies) | |
| env: | |
| CONTINUOUS_INTEGRATION: True | |
| run: | | |
| pytest --cov=maggma --cov-report=xml | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e .[docs] | |
| - name: Build | |
| run: mkdocs build |