Fixes to workflow #5
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Continuous integration | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# schedule: | |
# - cron: '15 10 * * *' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ 'ubuntu-latest', 'windows-latest'] | |
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
cache: 'pip' | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry config virtualenvs.create false | |
poetry install | |
- name: Create distribution | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' | |
run: | | |
inv build | |
- uses: actions/upload-artifact@v4 | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' | |
with: | |
name: openapitools-wheel | |
path: dist/robotframework_openapitools-*-py3-none-any.whl | |
testing: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry config virtualenvs.create false | |
poetry install | |
- name: Check types on Linux with latest Python 3.12 | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' | |
run: | | |
inv type-check | |
- name: Run linting on Linux with Python 3.12 | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' | |
run: | | |
inv lint | |
- name: Start the test server in the background | |
uses: JarvusInnovations/background-action@v1 | |
with: | |
run: | | |
inv start-api | |
wait-on: | | |
http://localhost:8000 | |
# IMPORTANT: to use environment variables in wait-on, you must use this form: ${{ env.VAR }} | |
# See wait-on section below for all resource types and prefixes | |
tail: true # true = stderr,stdout | |
# This will allow you to monitor the progress live | |
log-output-resume: stderr | |
# Eliminates previosuly output stderr log entries from post-run output | |
wait-for: 1m | |
log-output: stderr,stdout # same as true | |
log-output-if: failure | |
- name: Run tests | |
run: | | |
inv tests | |
- uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: Test results-${{ matrix.os }}-${{ matrix.python-version }} | |
path: zip_results/output |