mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
96 lines
2.5 KiB
YAML
96 lines
2.5 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
pull_request: {}
|
|
push: {}
|
|
schedule:
|
|
- cron: '5 1 * * *' # every day at 01:05
|
|
|
|
env:
|
|
DVC_TEST: "true"
|
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
|
SHELL: /bin/bash
|
|
|
|
jobs:
|
|
lint:
|
|
timeout-minutes: 10
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/[email protected]
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Python 3.8
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: 3.8
|
|
- name: Install requirements
|
|
run: |
|
|
pip install --upgrade pip setuptools wheel
|
|
pip install ".[dev]" pre-commit
|
|
- name: Check README
|
|
run: python setup.py checkdocs
|
|
- uses: pre-commit/[email protected]
|
|
tests:
|
|
timeout-minutes: 45
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-20.04, windows-latest, macos-latest]
|
|
pyv: ["3.7", "3.8", "3.9", "3.10"]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: ${{ matrix.pyv }}
|
|
- name: get pip cache dir
|
|
id: pip-cache-dir
|
|
run: |
|
|
echo "::set-output name=dir::$(pip cache dir)"
|
|
- name: set pip cache
|
|
id: pip-cache
|
|
uses: actions/[email protected]
|
|
with:
|
|
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
- name: install
|
|
if: steps.cache.pip-cache-dir.cache-hit != 'true'
|
|
run: |
|
|
pip install --upgrade pip setuptools wheel
|
|
pip install -e ".[dev]"
|
|
- name: run tests
|
|
timeout-minutes: 40
|
|
run: >-
|
|
python -m tests -n=auto
|
|
--cov-report=xml --cov-report=term
|
|
${{ env.extra_test_args }}
|
|
- name: upload coverage report
|
|
uses: codecov/[email protected]
|
|
with:
|
|
file: ./coverage.xml
|
|
fail_ci_if_error: false
|
|
notify:
|
|
if: github.ref == 'refs/heads/main' && failure()
|
|
needs:
|
|
- lint
|
|
- tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Slack Notification
|
|
uses: rtCamp/[email protected]
|
|
env:
|
|
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
|
SLACK_COLOR: ${{ job.status }}
|
|
SLACK_MESSAGE: 'CI Failed on main :boom:'
|
|
SLACK_TITLE: CI Status
|
|
SLACK_USERNAME: DVC-CI
|