Test actions pipeline #1
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: Docker PyTest | |
on: | |
push: | |
branches: [main, dev] | |
pull_request: | |
branches: [main, dev] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.6, 3.7, 3.8, 3.9] | |
linux-distro: ["ubuntu:latest", "debian:latest"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Build the Docker image | |
run: | | |
docker build . --file Dockerfile --tag gtfonow_test:${{ matrix.python-version }}-${{ matrix.linux-distro }} --build-arg PYTHON_VERSION=${{ matrix.python-version }} --build-arg LINUX_DISTRO=${{ matrix.linux-distro }} | |
- name: Run tests | |
run: | | |
docker run gtfonow_test:${{ matrix.python-version }}-${{ matrix.linux-distro }} |