Skip to content

ADHOC: Converts to Python #517

ADHOC: Converts to Python

ADHOC: Converts to Python #517

Workflow file for this run

name: Build and Test
on:
pull_request:
paths-ignore:
- CODEOWNERS
- LICENSE
- README.md
push:
branches:
- main
jobs:
test:
runs-on:
- ubuntu-latest
steps:
- name: Generate token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_KEY }}
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ steps.generate-token.outputs.token }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install poetry
run: python -m pip install poetry==2.1.1
- name: Configure poetry
run: poetry config virtualenvs.in-project true
- name: Cache the virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install
- name: Run format
run: poetry run format
- name: Run lint
run: poetry run lint
- name: Commit
if: ${{ github.ref != 'refs/heads/main' }}
id: commit
uses: EndBug/add-and-commit@v9
with:
author_name: github-actions[bot]
author_email: github-actions[bot]@github.com
message: Automatic commit via GitHub Actions
- name: Test
if: ${{ steps.commit.outputs.committed == 'false' }}
run: poetry run test