Skip to content

Update mypy requirement from <1.14,>=1.0 to >=1.0,<1.15 #787

Update mypy requirement from <1.14,>=1.0 to >=1.0,<1.15

Update mypy requirement from <1.14,>=1.0 to >=1.0,<1.15 #787

Workflow file for this run

---
name: tox-pytest
on: [push, pull_request]
jobs:
ci-test:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
strategy:
matrix:
python-version: ["3.10", "3.11"]
fail-fast: false
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set default GCP credentials
id: gcloud-auth
continue-on-error: true
uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: "projects/345950277072/locations/global/workloadIdentityPools/gh-actions-pool/providers/gh-actions-provider"
service_account: "mozilla-dev-sa@catalyst-cooperative-mozilla.iam.gserviceaccount.com"
- name: Set up conda environment for testing
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: 1.5.10-0
micromamba-binary-path: /home/runner/micromamba-bin-versioned/micromamba
environment-file: test_environment.yml
cache-environment: true
cache-environment-key: environment-${{ hashFiles('pyproject.toml') }}
condarc: |
channels:
- conda-forge
- defaults
channel_priority: strict
- shell: bash -l {0}
run: |
conda info
conda config --show-sources
conda config --show
printenv | sort
- name: Set USE_TRACKING_SERVER on main
run: |
if [[ $GITHUB_REF == 'main' && $GITHUB_EVENT_NAME == 'push' ]]; then
echo "USE_TRACKING_SERVER=true" >> "$GITHUB_ENV"
fi
- name: Create env file
run: |
touch .env
echo GCS_FILINGS_BUCKET_NAME=${{ secrets.GCS_FILINGS_BUCKET_NAME }} >> .env
echo GCS_IAM_USER=${{ secrets.GCS_IAM_USER }} >> .env
echo GCS_LABELS_BUCKET_NAME=${{ secrets.GCS_LABELS_BUCKET_NAME }} >> .env
echo GCS_METADATA_DB_INSTANCE_CONNECTION=${{ secrets.GCS_METADATA_DB_INSTANCE_CONNECTION }} >> .env
echo GCS_METADATA_DB_NAME=${{ secrets.GCS_METADATA_DB_NAME }} >> .env
echo GCS_PROJECT=${{ secrets.GCS_PROJECT }} >> .env
echo MLFLOW_TRACKING_URI=${{ secrets.MLFLOW_TRACKING_URI }} >> .env
- name: Run PyTest with Tox
run: |
tox
- name: Upload test coverage report to CodeCov
uses: codecov/codecov-action@v5
ci-notify:
runs-on: ubuntu-latest
needs: ci-test
if: ${{ always() }}
steps:
- name: Inform the Codemonkeys
uses: 8398a7/action-slack@v3
continue-on-error: true
with:
status: custom
fields: workflow,job,commit,repo,ref,author,took
custom_payload: |
{
username: 'action-slack',
icon_emoji: ':octocat:',
attachments: [{
color: '${{ needs.ci-test.result }}' === 'success' ? 'good' : '${{ needs.ci-test.result }}' === 'failure' ? 'danger' : 'warning',
text: `${process.env.AS_REPO}@${process.env.AS_REF}\n ${process.env.AS_WORKFLOW} (${process.env.AS_COMMIT})\n by ${process.env.AS_AUTHOR}\n Status: ${{ needs.ci-test.result }}`,
}]
}
env:
GITHUB_TOKEN: ${{ github.token }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
MATRIX_CONTEXT: ${{ toJson(matrix) }} # required