[pre-commit.ci] pre-commit autoupdate (#278) #103
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
name: CI | |
on: | |
pull_request: # any pull request | |
push: | |
branches: | |
- master | |
defaults: | |
run: | |
shell: bash | |
env: | |
NODE_VERSION: '20' | |
jobs: | |
shellcheck: | |
name: Shellcheck | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run ShellCheck | |
uses: ludeeus/[email protected] # cspell:ignore ludeeus | |
with: | |
scandir: ./scripts | |
spellcheck: | |
uses: finleyfamily/workflows/.github/workflows/spellcheck.yml@master | |
with: | |
node-version: '20' | |
test-local-action: | |
name: Test Local Action | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9, '3.10', 3.11, 3.12] | |
steps: | |
- uses: actions/checkout@v4 | |
- id: local-action | |
uses: ./ | |
with: | |
poetry-plugins: > | |
poetry-plugin-export | |
poetry-dynamic-versioning[plugin] | |
python-version: ${{ matrix.python-version }} | |
- name: check outputs.python-version | |
env: | |
MATRIX_PYTHON_VERSION: ${{ matrix.python-version }} | |
OUTPUTS_PYTHON_VERSION: ${{ steps.local-action.outputs.python-version }} | |
if: '!startsWith(steps.local-action.outputs.python-version, matrix.python-version)' | |
run: | | |
echo "outputs.python-version=${OUTPUTS_PYTHON_VERSION}" | |
echo "matrix.python-version=${MATRIX_PYTHON_VERSION}" | |
exit 1 | |
- name: check poetry | |
run: poetry --version | |
- name: ensure pre-commit is installed | |
run: poetry run pre-commit sample-config | |
- name: ensure poetry-dynamic-versioning is installed | |
run: poetry self show plugins | grep poetry-dynamic-versioning | |
- name: ensure poetry-plugin-export is installed | |
run: poetry self show plugins | grep poetry-plugin-export | |
test-local-action-no-plugins: | |
# This has to be run after the miss as the cache is not uploaded until the | |
name: Test Local Action without plugins | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.12] | |
steps: | |
- uses: actions/checkout@v4 | |
- id: local-action | |
uses: ./ | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: ensure pre-commit is installed | |
run: poetry run pre-commit sample-config | |
- name: ensure poetry-plugin-export is installed | |
run: poetry self show plugins | grep poetry-plugin-export | |
test-local-action-python-version-file: | |
name: Test Local Action Using Version From File | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: local-action | |
uses: ./ | |
with: | |
poetry-install: false | |
- name: ensure python version | |
run: python -c "import sys; assert sys.version_info >= (3, 12);" |