Skip to content

[#patch] Dependencies Upgrade, Add Python 3.13 #165

[#patch] Dependencies Upgrade, Add Python 3.13

[#patch] Dependencies Upgrade, Add Python 3.13 #165

Workflow file for this run

name: CI/CD
on:
push:
branches:
- main
tags:
- '*'
pull_request:
jobs:
test:
name: Install, lint and test
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.5
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
run: |
poetry install --no-interaction
- name: Run the linter
run: |
source .venv/bin/activate
./scripts/lint.sh
- name: Run the test
run: |
source .venv/bin/activate
./scripts/test.sh
tag:
name: Create new release
runs-on: ubuntu-20.04
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [ test ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
# When https://github.com/anothrNick/github-tag-action/issues/150 will be closed, we should be able to use
# newer version of anothrNick/github-tag-action (post 1.39.0) which should include this step.
- name: git config
run: |
git config --global --add safe.directory /github/workspace
- name: Dry bump version and push tag
id: dry-bump-tag
uses: anothrNick/github-tag-action@1.36.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DRY_RUN: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.5
virtualenvs-create: true
virtualenvs-in-project: true
- name: Commit the new version of the python package
env:
NEW_TAG: ${{ steps.dry-bump-tag.outputs.new_tag }}
run: |
git config user.name "GitHub Actions Bot"
git config user.email "info@ambiata.com"
poetry version ${NEW_TAG}
git add pyproject.toml
git commit -m "[tag] version ${NEW_TAG}"
git push origin main
- name: Push tag
id: push-tag
uses: anothrNick/github-tag-action@1.36.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true