Linting, CI, dependencies, and infrastructure updates #1689
Workflow file for this run
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: testing | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'docs/CHANGELOG.md' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements-testing.txt | |
- name: Lint with mypy | |
run: | | |
pip install mypy mypy-boto3 | |
mypy src/maggma | |
- name: Ruff | |
uses: chartboost/ruff-action@v1 | |
test: | |
needs: lint | |
services: | |
local_mongodb: | |
image: mongo:4.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.7", "3.8", "3.9", "3.10", "3.11"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements-testing.txt | |
pip install -r requirements-optional.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@v3.1.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e . | |
pip install -r requirements-optional.txt | |
pip install -r requirements-docs.txt | |
- name: Build | |
run: mkdocs build |