ci #4
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
--- | |
name: ci | |
on: | |
push: | |
branches: | |
- "main" | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: "Log level" | |
required: true | |
default: "warning" | |
schedule: | |
- cron: "0 0 1 */1 *" | |
jobs: | |
legacy-ci: | |
name: legacy-ci | |
runs-on: ubuntu-20.04 | |
env: | |
using_act: ${{ github.actor == 'nektos/act'}} | |
is_cron: ${{ github.event_name == 'schedule' }} | |
steps: | |
- name: Checkout. | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: | | |
3.8 | |
3.9 | |
- name: Make sure path are there also for act shells. | |
if: env.using_act == 'true' | |
run: | | |
echo "export PATH=\"/opt/hostedtoolcache/Python/${{ env.python_version }}/x64:/opt/hostedtoolcache/Python/${{ env.python_version }}/x64/bin:$PATH\"" >> /root/.bashrc | |
- name: Upgrade pip. | |
run: python -m pip install --upgrade pip | |
- name: Install poetry and invoke. | |
run: pip install poetry invoke | |
- name: Configure poetry | |
run: poetry config virtualenvs.in-project true | |
- name: Install dependencies and test for all legacy supported python version | |
run: inv test-all-legacy-python-versions | |
ci: | |
name: ci | |
runs-on: ubuntu-latest | |
env: | |
using_act: ${{ github.actor == 'nektos/act'}} | |
is_cron: ${{ github.event_name == 'schedule' }} | |
steps: | |
- name: Checkout. | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: | | |
3.10 | |
3.11 | |
3.12 | |
- name: Make sure path are there also for act shells. | |
if: env.using_act == 'true' | |
run: | | |
echo "export PATH=\"/opt/hostedtoolcache/Python/${{ env.python_version }}/x64:/opt/hostedtoolcache/Python/${{ env.python_version }}/x64/bin:$PATH\"" >> /root/.bashrc | |
- name: Upgrade pip. | |
run: python -m pip install --upgrade pip | |
- name: Install poetry and invoke. | |
run: pip install poetry invoke | |
- name: Configure poetry | |
run: poetry config virtualenvs.in-project true | |
- name: Install dependencies and test for all supported python version | |
run: inv test-all-new-python-versions --coverage | |
- name: Prepare the coveralls config. | |
run: | | |
echo "repo_token: ${{ secrets.COVERALLS_TOKEN }}" > .coveralls.yml | |
- name: Upload coverage stats | |
run: inv publish-coverage |