Skip to content

Commit

Permalink
Merge pull request conda-forge#1573 from xhochy/use-pre-commit-in-ci
Browse files Browse the repository at this point in the history
Run pre-commit hooks in CI
  • Loading branch information
chrisburr committed Feb 6, 2022
2 parents 162d435 + f54e2cc commit f21a727
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/auto-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ reportStatus: true

minApprovals:
COLLABORATOR: 0

requiredLabels:
- automerge
8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,20 @@ jobs:
- name: install code and deps
shell: bash -l {0}
run: |
conda install --file requirements.txt black coverage coveralls mock pytest pytest-cov pip ${CONDA_PKGS} --yes --quiet
conda install --file requirements.txt pre-commit coverage coveralls mock pytest pytest-cov pip ${CONDA_PKGS} --yes --quiet
python -m pip install -e .
git config --global user.email "smithy@smithy.smithy"
git config --global user.name "smithy"
- name: run pre-commit hooks
shell: bash -l {0}
run: |
pre-commit run -a
- name: run tests
shell: bash -l {0}
run: |
pytest tests --cov conda_smithy
black --check --verbose --diff --config=pyproject.toml .
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ repos:
rev: v4.0.1
hooks:
- id: check-yaml
exclude: (tests/recipes|conda_smithy.recipe)
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
Expand Down
1 change: 0 additions & 1 deletion extract_licenses.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
# Capture first table
# Extract code entries from table
wget -q -O - https://spdx.org/licenses/ | sed '/<table/,/<\/table>/!d;/<\/table>/q' | awk -- 'BEGIN{FS=">";RS="</code"};/<code/{print $NF}'

2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ markers =
legacy_circle: Test designed to run as if prior to the azure migration
legacy_travis: Test designed to run as if prior to the azure migration
legacy_appveyor: Test designed to run as if prior to the azure migration
cli: CLI tests outside of test/test_cli.py
cli: CLI tests outside of test/test_cli.py
6 changes: 3 additions & 3 deletions tests/recipes/click-test-feedstock/.appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

environment:



matrix:
- CONFIG: python2.7

- CONFIG: python3.6


# We always use a 64-bit machine, but can build x86 distributions
# with the TARGET_ARCH variable.
Expand Down
2 changes: 1 addition & 1 deletion tests/recipes/click-test-feedstock/.ci_support/README
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This file is automatically generated by conda-smithy. To change any matrix elements, you should change conda-smithy's input conda_build_config.yaml and re-render the recipe, rather than editing these files directly.
This file is automatically generated by conda-smithy. To change any matrix elements, you should change conda-smithy's input conda_build_config.yaml and re-render the recipe, rather than editing these files directly.
2 changes: 1 addition & 1 deletion tests/recipes/click-test-feedstock/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ osx_image: xcode6.4

env:
matrix:

- CONFIG=python2.7
- CONFIG=python3.6

Expand Down
1 change: 0 additions & 1 deletion tests/recipes/click-test-feedstock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,3 @@ In order to produce a uniquely identifiable distribution:

the [``build/number``](https://conda.pydata.org/docs/building/meta-yaml.html#build-number-and-string)
back to 0.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
echo "dummy linux setup script"
echo "dummy linux setup script"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
echo "dummy osx setup script"
echo "dummy osx setup script"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
echo "dummy win setup script"
echo "dummy win setup script"

0 comments on commit f21a727

Please sign in to comment.