Skip to content

Commit

Permalink
use native concurrency (iterative#8320)
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry authored Sep 19, 2022
1 parent 2f6bc70 commit b5f20f8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 30 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
name: benchmarks
on: [pull_request, workflow_dispatch]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
bench:
name: run benchmarks
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04]
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: "3.10"
- uses: iterative/dvc-bench@main
with:
pytest_options: "-k 'test_init or test_help'"

30 changes: 11 additions & 19 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
name: Tests

on:
pull_request: {}
push: {}
push:
branches: [main]
pull_request:
schedule:
- cron: '5 1 * * *' # every day at 01:05
workflow_dispatch:

env:
DVC_TEST: "true"
HOMEBREW_NO_AUTO_UPDATE: 1
SHELL: /bin/bash

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

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
Expand All @@ -31,7 +33,7 @@ jobs:
run: |
pip install --upgrade pip setuptools wheel
pip install collective.checkdocs==0.2
pip install ".[dev]" pre-commit
pip install ".[dev]"
- name: Check README
run: python setup.py checkdocs
- uses: pre-commit/[email protected]
Expand All @@ -57,18 +59,8 @@ jobs:
uses: actions/setup-python@v4
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/cache@v3
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
cache-dependency-path: setup.cfg
- name: install
if: steps.cache.pip-cache-dir.cache-hit != 'true'
run: |
Expand Down

0 comments on commit b5f20f8

Please sign in to comment.