-
Notifications
You must be signed in to change notification settings - Fork 1
101 lines (97 loc) · 3.16 KB
/
on-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# 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: 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: 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:
matrix:
os: [ 'ubuntu-latest', 'windows-latest']
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12']
robot-version: ['6.1.1', '7.0.0']
exclude:
- os: 'windows-latest'
python-version: '3.9'
- os: 'windows-latest'
python-version: '3.10'
- os: 'windows-latest'
python-version: '3.11'
- os: 'ubuntu-latest'
python-version: '3.9'
robot-version: '6.1.1'
- os: 'ubuntu-latest'
python-version: '3.10'
robot-version: '6.1.1'
- os: 'ubuntu-latest'
python-version: '3.11'
robot-version: '6.1.1'
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
pip install robotframework==${{ matrix.robot-version}}
- name: Start the test server in the background
run: |
inv start-api &
- name: Run tests
run: |
inv tests
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: Test results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.robot-version}}
path: zip_results/output