Skip to content

Continuous integration #3

Continuous integration

Continuous integration #3

Workflow file for this run

# 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"]
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'
run: |
inv build
- uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest'
with:
name: rfbrowser-wheel
path: dist/robotframework_openapitools-*-py3-none-any.whl
testing:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
python-version: "3.8"
shard: 1
- os: windows-latest
python-version: "3.9"
shard: 1
- os: windows-latest
python-version: "3.10"
shard: 3
- os: windows-latest
python-version: "3.11"
shard: 4
- os: windows-latest
python-version: "3.12"
shard: 2
- os: ubuntu-latest
python-version: "3.8"
shard: 3
- os: ubuntu-latest
python-version: "3.9"
shard: 4
- os: ubuntu-latest
python-version: "3.10"
shard: 2
- os: ubuntu-latest
python-version: "3.11"
shard: 1
- os: ubuntu-latest
python-version: "3.12"
shard: 1
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 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
run: |
inv start-api
- name: Run tests
run: |
inv tests
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: Test results-${{ matrix.os }}-${{ matrix.shard }}-${{ matrix.python-version }}-${{ matrix.node-version }}
path: zip_results/output