Skip to content

Commit

Permalink
adjust cache and progressbar in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xoolive committed Sep 26, 2024
1 parent 052b720 commit 0d4f832
Show file tree
Hide file tree
Showing 5 changed files with 1,884 additions and 1,727 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
path: |
~/.local
.venv
key: poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-${{ runner.os }}-${{ hashFiles('poetry.lock') }}

- name: Install and configure Poetry
uses: snok/[email protected]
Expand All @@ -86,15 +86,15 @@ jobs:
~/.cache/traffic/
~/.cache/opensky/
~/.cache/cartes/
key: traffic-${{ runner.os }}
key: traffic-${{ hashFiles('poetry.lock') }}

- name: Cache folder for documentation
uses: actions/cache@v4
id: docs-folder
with:
path: |
docs/_build/
key: docs-${{ runner.os }}
key: docs-${{ hashFiles('poetry.lock') }}

- name: Ubuntu system dependencies
run: |
Expand Down Expand Up @@ -137,6 +137,8 @@ jobs:
export TRAFFIC_CONFIG=$(poetry run python -c "from traffic import config_file; print(config_file)")
sed -i "/tqdm_tyle =/ s,auto,disable," $TRAFFIC_CONFIG
sed -i "/nm_path =/ s,=$,= $PWD/traffic_data/airac_2111," $TRAFFIC_CONFIG
# sed -i "/pkcs12_filename =/ s,=.*$,= $PWD/traffic_data/CC0000007011_501_openssl.p12," $TRAFFIC_CONFIG
# sed -i "/pkcs12_password =/ s,=$,= $PKCS12_PASSWORD," $TRAFFIC_CONFIG
Expand Down
25 changes: 19 additions & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,26 @@ env:

jobs:
deploy:
runs-on: ubuntu-latest # ${{ matrix.os }}
name: python-${{ matrix.python-version }} on ${{ matrix.os }}

runs-on: ${{ matrix.os }}

strategy:
matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
# onnxruntime needed for 3.11
python-version: ["3.9", "3.10", "3.11", "3.12"]
os:
- ubuntu-latest
# - windows-latest
# - macos-latest
python-version:
- "3.10"
- "3.11"
- "3.12"

fail-fast: false

env:
PYTHON_VERSION: ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -75,7 +87,7 @@ jobs:
path: |
~/.local
.venv
key: poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}
key: poetry-${{ runner.os }}-${{ hashFiles('poetry.lock') }}

- name: Install and configure Poetry
uses: snok/[email protected]
Expand All @@ -95,7 +107,7 @@ jobs:
~/.cache/traffic/
~/.cache/opensky/
~/.cache/cartes/
key: traffic-${{ runner.os }}
key: traffic-${{ hashFiles('poetry.lock') }}

- name: Ubuntu system dependencies
run: |
Expand All @@ -121,6 +133,7 @@ jobs:
poetry run mypy src tests
- name: Run tests
if: ${{ matrix.python-version == '3.12' || steps.cache-folder.outputs.cache-hit == 'true' }}
env:
LD_LIBRARY_PATH: /usr/local/lib
TRAFFIC_NOPLUGIN: ""
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
- id: ruff-format
args: [--check]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
rev: v1.11.2
hooks:
- id: mypy
exclude: ^docs/conf.py
Expand Down
Loading

0 comments on commit 0d4f832

Please sign in to comment.