Merge pull request #203 from metno/135-output-x-and-y-wind-in-project… #168
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
| # This workflow will install Python dependencies, run tests using tox | |
| name: Simple Tox Tests | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # https://github.com/actions/cache | |
| - name: Restore tox dir cache and save after run | |
| id: restore-tox | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-tox-data | |
| with: | |
| path: .tox | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('pyproject.toml', 'tox.ini', '.tox/*/CACHEDIR.TAG') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| # https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' # caching pip dependencies | |
| cache-dependency-path: | | |
| pyproject.toml | |
| tox.ini | |
| - name: Install python dependencies | |
| run: | | |
| python -m pip install tox | |
| - name: Run ruff format check (<50M) | |
| run: | | |
| tox -e ruff_checkformat | |
| - name: Run ruff check (<50M) | |
| run: | | |
| tox -e ruff_check | |
| - name: Fetch dataset (175M) | |
| run: | | |
| tox -e trainingdata | |
| - name: Run tox unit tests (6G) | |
| run: | | |
| tox -e py310 | |
| - name: Run tox security check (<50M) | |
| run: | | |
| tox -e bandit | |
| # Show disk usage | |
| - run: df -h | |
| - run: du -hsc .tox/* ~/.cache/pip |