Skip to content

feat: bump to use node20 runtime #291

feat: bump to use node20 runtime

feat: bump to use node20 runtime #291

Workflow file for this run

name: Testing
on: [push, pull_request]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
codespell_pip_version: ['codespell']
experimental: [false]
include:
- codespell_pip_version: 'git+https://github.com/codespell-project/codespell.git'
# Set this to true if git master is breaking the action's tests
experimental: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install codespell via pip using ${{ matrix.codespell_pip_version }}
run: pip install ${{ matrix.codespell_pip_version }}
- name: Check codespell
run: codespell --version
- name: Install Bats
run: |
git clone --quiet https://github.com/bats-core/bats-core.git
cd bats-core
git fetch --tags
# Checkout the latest tag
git checkout --quiet $(git describe --tags `git rev-list --tags --max-count=1`)
sudo ./install.sh "/usr/local" > /dev/null
- name: Run Bats tests
run: bats "./test"
run_action:
name: Test run action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
path: test/testdata
only_warn: 1
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
check_filenames: true
check_hidden: true
# When using this Action in other repos, the --skip option below can be removed
skip: ./.git,./codespell-problem-matcher/test,./test,./README.md,./.github/workflows/testing.yml,./.pre-commit-config.yaml
# Check our README (and this workflow) ignoring the two intentional typos
- uses: ./
with:
check_filenames: true
check_hidden: true
path: ./README.md,./.github/workflows/testing.yml
ignore_words_list: abandonned,ackward
diagnose_bats:
name: Diagnose bats
needs: test
if: always() && needs.test.result == 'failure'
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
codespell_pip_version: ['codespell']
include:
- codespell_pip_version: 'git+https://github.com/codespell-project/codespell.git'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- run: pip3 --quiet --quiet install ${{ matrix.codespell_pip_version }}
- run: |
# Simulate the Dockerfile COPY command
[ -d "${RUNNER_TEMP}/code/" ] || sudo mkdir -p ${RUNNER_TEMP}/code/
[ -f "${RUNNER_TEMP}/code/codespell-matcher.json" ] || sudo cp codespell-problem-matcher/codespell-matcher.json ${RUNNER_TEMP}/code/
#ls -alR ${RUNNER_TEMP}/code/
[ -d "/code/" ] || sudo mkdir -p /code/
[ -f "/code/codespell-matcher.json" ] || sudo cp codespell-problem-matcher/codespell-matcher.json /code/
#ls -alR /code/
# Add a random place BATS tries to put it
[ -d "/github/workflow/" ] || sudo mkdir -p /github/workflow/ && sudo chmod 777 /github/workflow/
#ls -alR /github/workflow/
export INPUT_CHECK_FILENAMES=""
export INPUT_CHECK_HIDDEN=""
export INPUT_EXCLUDE_FILE=""
export INPUT_SKIP=""
export INPUT_IGNORE_WORDS_FILE="./test/ignore-words-file.txt"
export INPUT_IGNORE_WORDS_LIST=""
export INPUT_PATH="./test/testdata"
export INPUT_ONLY_WARN=""
./entrypoint.sh || echo $?