generate conda env yml and pip requirements files automatically using script #884
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
# This workflow runs the repo's CI tests. | |
name: CI | |
on: | |
push: | |
branches: [main, v1] | |
pull_request: | |
branches: [main, v1] | |
schedule: | |
- cron: "0 4 * * 1" # every monday at 04:00 UTC | |
workflow_dispatch: | |
jobs: | |
ci: | |
name: Python ${{ matrix.python-version }} ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
os: [ubuntu-latest] | |
defaults: | |
run: | |
shell: bash -eulo pipefail {0} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Create environment with Micromamba | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
cache-environment: true | |
create-args: python=${{ matrix.python-version }} | |
environment-file: ./environments/tests/env-ci.yml | |
post-cleanup: none | |
- name: Install OSMnx | |
run: | | |
python -m pip install -e . | |
python -m pip check | |
micromamba list | |
python -m pip show osmnx | |
- name: Run pre-commit checks | |
uses: pre-commit/action@v3 | |
env: | |
SKIP: no-commit-to-branch | |
- name: Test docs build | |
run: python -m sphinx -E -W --keep-going -b html ./docs/source ./docs/build/html | |
- name: Test code and coverage | |
run: python -m pytest --verbose --maxfail=1 --typeguard-packages=osmnx --cov=osmnx --cov-report=xml | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |