Skip to content

Bump actions/checkout from 2 to 4 #396

Bump actions/checkout from 2 to 4

Bump actions/checkout from 2 to 4 #396

Workflow file for this run

name: CI complete testing
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
on: # Trigger the workflow on push or pull request, but only for the main branch
push: {}
pull_request:
branches: [main]
jobs:
pytester:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-22.04"] # macOS-11, windows-2019
python-version: ["3.8"]
package: ["plant_pathology", "imet_collect", "cassava", "birdclef"]
# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
#cache: "pip"
- name: Install dependencies
run: |
sudo apt install -y libsndfile1
pip install ".[test,${{ matrix.package }}]" --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip list
shell: bash
- name: Tests
run: |
python -m pytest kaggle_imgclassif tests/${{ matrix.package }} -v --cov=kaggle_imgclassif
- name: Statistics
run: |
coverage report
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
if: always()
# see: https://github.com/actions/toolkit/issues/399
continue-on-error: true
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: cpu,pytest,python${{ matrix.python-version }},${{ matrix.package }}
fail_ci_if_error: false
testing-guardian:
runs-on: ubuntu-latest
needs: pytester
if: always()
steps:
- run: echo "${{ needs.pytester.result }}"
- name: failing...
if: needs.pytester.result == 'failure'
run: exit 1
- name: cancelled or skipped...
if: contains(fromJSON('["cancelled", "skipped"]'), needs.pytester.result)
timeout-minutes: 1
run: sleep 90