Skip to content

Commit

Permalink
update template
Browse files Browse the repository at this point in the history
  • Loading branch information
pared authored Dec 28, 2022
1 parent a21e6eb commit 839f2c4
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/iterative/cookiecutter-dvc-plugin",
"commit": "5e07217326c0c136274315e550e3932668a407a7",
"commit": "254d2976fe65d918e86f7612c8d6540771e9ef81",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/release.yaml.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff a/.github/workflows/release.yaml b/.github/workflows/release.yaml (rejected hunks)
@@ -1,23 +1,30 @@
name: Release
+
on:
release:
types: [published]
+
+permissions:
+ contents: read
+
jobs:
pip:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- - name: Set up Python 3.8
- uses: actions/setup-python@v3
+ - uses: actions/setup-python@v3
with:
python-version: 3.8
- - name: Build packages
+ - name: Install
run: |
- pip install -U pip
- pip install -U build setuptools>=58.2
- python -m build --sdist --wheel --outdir dist/
+ pip install -U-upgrade pip wheel
+ pip install build twine
+ - name: Build
+ run: |
+ python -m build
+ twine check dist/*
- name: Publish packages to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
83 changes: 26 additions & 57 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,87 +1,56 @@
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

permissions:
contents: read

jobs:
lint:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2.4.0
with:
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v2.2.2
with:
python-version: 3.8
- name: Install requirements
run: |
pip install wheel
pip install -e '.[tests]'
pip install git+https://github.com/iterative/dvc pre-commit
- name: Check README
run: python setup.py checkdocs
- uses: pre-commit/action@v2.0.3
tests:
timeout-minutes: 45
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
pyv: ["3.8", "3.9", "3.10"]
exclude:
# no wheels for pygit2 yet
- os: windows-latest
pyv: "3.10"
pyv: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2.2.2
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@v2.1.6
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: |
pip install --upgrade pip setuptools wheel
pip install --upgrade pip wheel
pip install -e ".[tests]"
pip install "dvc[testing]@git+https://github.com/iterative/dvc"
- name: setup git
run: |
git config --global user.email "dvctester@example.com"
git config --global user.name "DVC Tester"
pip install "dvc[testing] @ git+https://github.com/iterative/dvc"
- name: lint
timeout-minutes: 10
uses: pre-commit/action@v3.0.0

- name: run tests
timeout-minutes: 40
timeout-minutes: 15
run: pytest -v -n=auto --cov-report=xml --cov-report=term

- name: upload coverage report
uses: codecov/codecov-action@v2.1.0
with:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/update-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ name: Update template
on:
schedule:
- cron: '5 1 * * *' # every day at 01:05

workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install deps
run: pip install cruft
- name: Update template
Expand All @@ -25,4 +24,3 @@ jobs:
commit-message: update template
title: update template
token: ${{ secrets.WORKFLOW_TOKEN }}

14 changes: 14 additions & 0 deletions dvc_ssh/tests/test_dvc.py.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff a/dvc_ssh/tests/test_dvc.py b/dvc_ssh/tests/test_dvc.py (rejected hunks)
@@ -51,12 +51,10 @@ class TestAdd(_TestAdd):
def hash_name(self):
raise NotImplementedError

-
@pytest.fixture
def hash_value(self):
raise NotImplementedError

-
@pytest.fixture
def dir_hash_value(self):
raise NotImplementedError
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11

[options]
setup_requires =
Expand Down

0 comments on commit 839f2c4

Please sign in to comment.