Merge pull request #64 from rl-institut/feature-33-versions #19
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
# SPDX-FileCopyrightText: Ludwig Hülk (Ludee) © Reiner Lemoine Institut | |
# SPDX-FileCopyrightText: Jonas Huber (jh-RLI) © Reiner Lemoine Institut | |
# SPDX-License-Identifier: CC0-1.0 | |
name: automated-testing | |
on: | |
push: | |
branches: [production, develop] | |
pull_request: | |
branches: [production, develop] | |
jobs: | |
test: | |
strategy: | |
# fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: [3.8, 3.9] | |
# you can separate the tox-envs in different .yml files | |
# see version 0.10.1 | |
# https://github.com/joaomcteixeira/python-project-skeleton/releases/tag/v0.10.1 | |
# below the list of tox envs that you wish to include in the matrix | |
tox-envs: [lint, test] | |
# workaround to ignore 'pr' when merging to main | |
# see: https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6 | |
isMerge: | |
- ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
exclude: | |
- isMerge: true | |
tox-envs: pr | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install tox | |
- name: unit tests | |
run: tox -e ${{ matrix.tox-envs }} |