Skip to content

Merge pull request #137 from asyncee/dependabot/github_actions/action… #289

Merge pull request #137 from asyncee/dependabot/github_actions/action…

Merge pull request #137 from asyncee/dependabot/github_actions/action… #289

Workflow file for this run

# Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license
name: Run tox
on:
pull_request:
push:
schedule:
- cron: '0 16 * * 5' # Every Friday at 16:00
jobs:
run_tox:
name: Run tox
runs-on: ubuntu-20.04
strategy:
matrix:
python-version:
- 3.7 # oldest supported version
# - 3.8 # no particial need
# - 3.9 # no particial need
- '3.10' # includes tox env about code coverage
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |-
pip install \
--disable-pip-version-check \
--user \
--no-warn-script-location \
tox
echo "PATH=${HOME}/.local/bin:${PATH}" >> "${GITHUB_ENV}"
- name: Run tox (environments matching Python ${{ matrix.python-version }})
run: |-
set -x
python_version_without_dot="$(sed 's,\.,,' <<< "${{ matrix.python-version }}")"
function join_by { local IFS="$1"; shift; echo "$*"; }
tox_envs=( $(tox --listenvs | fgrep "py${python_version_without_dot}-") )
tox -e "$(join_by ',' "${tox_envs[@]}")"
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}