Update the README to match changes in identify.py
#141
Workflow file for this run
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: "🔬 Test" | |
on: | |
pull_request: null | |
push: | |
branches: | |
- "main" | |
- "releases" | |
jobs: | |
tox: | |
name: "Tox (${{ matrix.os.name }})" | |
strategy: | |
matrix: | |
os: | |
- name: "Linux" | |
runner: "ubuntu-latest" | |
- name: "macOS" | |
runner: "macos-latest" | |
- name: "Windows" | |
runner: "windows-latest" | |
fail-fast: false | |
runs-on: "${{ matrix.os.runner }}" | |
steps: | |
- name: "Checkout the repository" | |
uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1 | |
- name: "Setup Pythons" | |
uses: "actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236" # v4.7.1 | |
with: | |
python-version: | | |
pypy3.8 | |
pypy3.9 | |
pypy3.10 | |
3.8 | |
3.9 | |
3.10 | |
3.11 | |
3.12 | |
allow-prereleases: true | |
cache: "pip" | |
- name: "Detect Pythons" | |
uses: "./" | |
- name: "Restore cache" | |
id: "restore-cache" | |
uses: "actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84" # v3.3.2 | |
with: | |
path: | | |
.tox/ | |
.venv | |
key: "tox-os=${{ matrix.os.runner }}-hash=${{ hashFiles('.python-identifiers', 'tox.ini') }}" | |
- name: "Identify .venv path" | |
shell: "bash" | |
run: "echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> $GITHUB_ENV" | |
- name: "Create a virtual environment" | |
if: "steps.restore-cache.outputs.cache-hit == false" | |
run: | | |
python -m venv .venv | |
${{ env.venv-path }}/python -m pip install --upgrade pip setuptools wheel | |
${{ env.venv-path }}/pip install tox | |
- name: "Run the test suite" | |
run: "${{ env.venv-path }}/tox" | |
inputs: | |
name: "Inputs (${{ matrix.os.name }})" | |
strategy: | |
matrix: | |
os: | |
- name: "Linux" | |
runner: "ubuntu-latest" | |
- name: "macOS" | |
runner: "macos-latest" | |
- name: "Windows" | |
runner: "windows-latest" | |
fail-fast: false | |
runs-on: "${{ matrix.os.runner }}" | |
steps: | |
- name: "Checkout the repository" | |
uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1 | |
- name: "Test: Disable output file" | |
uses: "./" | |
with: | |
identifiers-filename: "" | |
- name: "Verify: Disable output file" | |
shell: "bash" | |
run: | | |
if [[ -e .python-identifiers ]]; then | |
exit 1 | |
fi | |
- name: "Test: Default output filename" | |
uses: "./" | |
- name: "Verify: Default output filename" | |
shell: "bash" | |
run: | | |
if [[ ! -e .python-identifiers ]]; then | |
exit 1 | |
else | |
rm ".python-identifiers" | |
fi | |
- name: "Test: Custom output filename" | |
uses: "./" | |
with: | |
identifiers-filename: "favored-filename.txt" | |
- name: "Verify: Custom output filename" | |
shell: "bash" | |
run: | | |
if [[ ! -e "favored-filename.txt" ]]; then | |
exit 1 | |
else | |
rm "favored-filename.txt" | |
fi |