Test #3443
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: | |
schedule: | |
- cron: '12 * * * *' | |
pull_request: | |
push: | |
branches: | |
- '[0-9].[0-9].x' | |
tags: | |
- '*' | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
# The number of builds that submit code coverage configured here MUST be identical | |
# to the number of `after_n_builds` in ./codecov.yml. | |
- name: 'Python 3.13' | |
os: ubuntu-latest | |
python: '3.13' | |
- name: 'Python 3.12' | |
os: ubuntu-latest | |
python: '3.12' | |
- name: 'Python 3.11' | |
os: ubuntu-latest | |
python: '3.11' | |
- name: 'macOS' | |
os: macos-latest | |
python: '3.13' | |
- name: 'Windows' | |
os: windows-latest | |
python: '3.13' | |
timeout-minutes: 60 | |
steps: | |
- name: Check out the source code | |
uses: actions/checkout@v4 | |
- name: Get the pip cache directory | |
run: echo "pip_cache_dir=$(pip cache dir)" >> $GITHUB_ENV | |
shell: bash | |
- name: Cache pip | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.pip_cache_dir }} | |
key: pip-${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('./setup.py') }} | |
restore-keys: | | |
pip-${{ runner.os }}-${{ matrix.python }}- | |
- name: Cache Mypy | |
if: startsWith(runner.os, 'Linux') | |
uses: actions/cache@v4 | |
with: | |
path: ./.mypy_cache | |
key: mypy-${{ matrix.python }}-${{ hashFiles('./setup.py') }} | |
restore-keys: | | |
mypy-${{ matrix.python }}- | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Lua | |
if: startsWith(runner.os, 'Linux') | |
uses: leafo/gh-actions-lua@v10 | |
- name: Install LuaRocks | |
if: startsWith(runner.os, 'Linux') | |
uses: leafo/gh-actions-luarocks@v4 | |
- name: Install Lua dependencies | |
if: startsWith(runner.os, 'Linux') | |
run: luarocks install busted | |
- name: Build the development environment | |
run: ./bin/build-ci | |
shell: bash | |
- name: Run the tests | |
if: startsWith(runner.os, 'Linux') | |
run: ./bin/test | |
shell: bash | |
- name: Run the tests | |
if: ${{ ! startsWith(runner.os, 'Linux') }} | |
run: BETTY_NGINX_TEST_SKIP_BUSTED=true BETTY_NGINX_TEST_SKIP_SHELLCHECK=true ./bin/test | |
shell: bash | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |