mirror of
https://github.com/Telecominfraproject/oopt-gnpy-api.git
synced 2025-10-30 01:22:26 +00:00
Add worklows for github
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com> Change-Id: I0c7d201ae906c1a10ccf89741bc8de6d2805dff8
This commit is contained in:
103
.github/workflows/main.yml
vendored
Normal file
103
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
name: GNPY-API-CI
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linters:
|
||||||
|
name: Lint Code
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pip install tox
|
||||||
|
- name: Run linters
|
||||||
|
run: |
|
||||||
|
tox -e linters
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Tox test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: fedora-python/tox-github-action@v37.0
|
||||||
|
with:
|
||||||
|
tox_env: ${{ matrix.tox_env }}
|
||||||
|
dnf_install: ${{ matrix.dnf_install }}
|
||||||
|
- uses: codecov/codecov-action@v3.1.1
|
||||||
|
if: ${{ endswith(matrix.tox_env, '-cover') }}
|
||||||
|
with:
|
||||||
|
files: ${{ github.workspace }}/cover/coverage.xml
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
tox_env:
|
||||||
|
- py38
|
||||||
|
- py39
|
||||||
|
- py310
|
||||||
|
- py311
|
||||||
|
- py312-cover
|
||||||
|
include:
|
||||||
|
- tox_env: docs
|
||||||
|
dnf_install: graphviz
|
||||||
|
|
||||||
|
other-platforms:
|
||||||
|
name: Tests on other platforms
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python_version }}
|
||||||
|
- run: |
|
||||||
|
pip install --editable .[tests]
|
||||||
|
pytest -vv
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: windows-2019
|
||||||
|
python_version: "3.10"
|
||||||
|
- os: windows-2022
|
||||||
|
python_version: "3.11"
|
||||||
|
- os: windows-2022
|
||||||
|
python_version: "3.12"
|
||||||
|
- os: macos-13
|
||||||
|
python_version: "3.12"
|
||||||
|
- os: macos-14
|
||||||
|
python_version: "3.12"
|
||||||
|
|
||||||
|
paywalled-platforms:
|
||||||
|
name: Tests on paywalled platforms
|
||||||
|
if: github.repository_owner == 'Telecominfraproject'
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python_version }}
|
||||||
|
- run: |
|
||||||
|
pip install --editable .[tests]
|
||||||
|
pytest -vv
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: macos-13-xlarge # Apple M1 CPU
|
||||||
|
python_version: "3.12"
|
||||||
Reference in New Issue
Block a user