Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel python test builds #1

Merged
merged 1 commit into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 25 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,42 @@ on:

jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
runs-on: ubuntu-latest
# TODO might be simpler to matrix this out on base executor, like this
# example:
# https://github.com/codecov/python-standard/blob/master/.github/workflows/python-standard.yml
container:
image: noahpendleton/youtrack-python-cli:2023-03-15
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Run Tox
run: tox
run: |
pip install tox==4.4.7
tox -e py${{ matrix.python-version }}

coverage:
runs-on: ubuntu-latest
container:
image: noahpendleton/youtrack-python-cli:2023-03-15
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

steps:
- uses: actions/checkout@v3

- name: Generate and upload coverage
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Generate coverage
run: |
pip install codecov==2.1.12
pip install tox==4.4.7
tox -e coverage
codecov

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
with:
# note: this is required for public repos, see here:
# https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
token: ${{ secrets.CODECOV_TOKEN }}
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
[![GitHub](https://img.shields.io/badge/GitHub-noahp/youtrack--python--cli-8da0cb?style=for-the-badge&logo=github)](https://github.com/noahp/youtrack-python-cli)

<!-- [![PyPI
version](https://img.shields.io/pypi/v/youtrack-python-openapi.svg?style=for-the-badge&logo=PyPi&logoColor=white)](https://pypi.org/project/youtrack-python-openapi/)
[![PyPI
pyversions](https://img.shields.io/pypi/pyversions/youtrack-python-openapi.svg?style=for-the-badge&logo=python&logoColor=white&color=ff69b4)](https://pypi.python.org/pypi/youtrack-python-openapi/) -->

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/noahp/youtrack-python-cli/main.yml?branch=main&logo=github-actions&logoColor=white&style=for-the-badge)](https://github.com/noahp/youtrack-python-cli/actions)
[![codecov](https://img.shields.io/codecov/c/github/noahp/youtrack-python-cli.svg?style=for-the-badge&logo=codecov)](https://codecov.io/gh/noahp/youtrack-python-cli)

# YouTrack Python CLI

Usage:
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
coverage
py{37,38,39,310,311}
py{3.7,3.8,3.9,3.10,3.11}
isolated_build = True

[testenv]
Expand All @@ -15,7 +15,7 @@ commands =
poetry install
pytest -vv --cov-report=term-missing --cov=youtrack_python_cli --cov-report=html:{envdir} {posargs}

[testenv:py37]
[testenv:py3.7]
description = Quick sanity test for Python 3.7 (no snapshots, no pytest)
deps =
poetry==1.3.1
Expand Down