-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from hsaunders1904/add_ability_to_ignore_direc…
…tories Add ability to ignore directories
- Loading branch information
Showing
10 changed files
with
554 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,40 @@ | ||
name: pyautoenv test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Code Quality | ||
run: | | ||
python -m pip install pre-commit | ||
pre-commit run --all-files | ||
- name: Test | ||
run: | | ||
python -m pip install poetry | ||
poetry install --only=test | ||
poetry run pytest --cov --cov-report=term-missing --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Code Quality | ||
run: | | ||
python -m pip install pre-commit | ||
pre-commit run --all-files | ||
- name: Test | ||
run: | | ||
python -m pip install poetry | ||
poetry install --only=test | ||
poetry run pytest --cov --cov-report=term-missing --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
test-windows: | ||
name: Test-Windows | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Test | ||
run: | | ||
python -m pip install poetry | ||
poetry install --only=test | ||
poetry run pytest --cov --cov-report=term-missing | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Test | ||
run: | | ||
python -m pip install poetry | ||
poetry install --only=test | ||
poetry run pytest --cov --cov-report=term-missing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,39 @@ | ||
name: pyautoenv release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: string | ||
description: "New version e.g., 3.1.4" | ||
description: New version e.g., 3.1.4 | ||
required: true | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Validate Version | ||
run: | | ||
python -m pip install toml | ||
poetry_version="$(python -c 'import toml; print(toml.load("pyproject.toml")["tool"]["poetry"]["version"])')" | ||
echo "Version from input: ${{ github.event.inputs.version }}" | ||
echo "Version from poetry: ${poetry_version}" | ||
if ! [ "${{ github.event.inputs.version }}" = "${poetry_version}" ]; then | ||
exit 1; | ||
fi | ||
script_version="$(python -c 'import pyautoenv; print(pyautoenv.__version__)')" | ||
echo "Version from script: ${script_version}" | ||
if ! [ "${poetry_version}" = "${script_version}" ]; then | ||
exit 1; | ||
fi | ||
- name: Release | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release create "v${{ github.event.inputs.version }}" \ | ||
--target main \ | ||
--generate-notes \ | ||
--draft | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Validate Version | ||
run: | | ||
python -m pip install toml | ||
poetry_version="$(python -c 'import toml; print(toml.load("pyproject.toml")["tool"]["poetry"]["version"])')" | ||
echo "Version from input: ${{ github.event.inputs.version }}" | ||
echo "Version from poetry: ${poetry_version}" | ||
if ! [ "${{ github.event.inputs.version }}" = "${poetry_version}" ]; then | ||
exit 1; | ||
fi | ||
script_version="$(python -c 'import pyautoenv; print(pyautoenv.__version__)')" | ||
echo "Version from script: ${script_version}" | ||
if ! [ "${poetry_version}" = "${script_version}" ]; then | ||
exit 1; | ||
fi | ||
- name: Release | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release create "v${{ github.event.inputs.version }}" \ | ||
--target main \ | ||
--generate-notes \ | ||
--draft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.4.2 | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.5.4 | ||
hooks: | ||
- id: remove-crlf | ||
- id: forbid-tabs | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
- id: remove-crlf | ||
- id: forbid-tabs | ||
- repo: https://github.com/psf/black | ||
rev: 23.11.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.259 | ||
hooks: | ||
- id: ruff | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.1.1 | ||
- id: black | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.1.6 | ||
hooks: | ||
- id: mypy | ||
- id: ruff | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.7.0 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: | ||
- types-toml | ||
- repo: https://github.com/google/yamlfmt | ||
rev: v0.10.0 | ||
hooks: | ||
- id: yamlfmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.