Skip to content

Fix the lint issues with python 3.12 #17

Fix the lint issues with python 3.12

Fix the lint issues with python 3.12 #17

Workflow file for this run

name: Build, Lint, Test, and Publish
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
container:
image: python:3.12-slim
steps:
- uses: actions/checkout@v4
- name: Install build tools
run: apt-get update && apt-get install -y gcc build-essential
- name: Install Poetry
run: pip install poetry
- name: Install dependencies
run: poetry install --with dev
- name: Lint with flake8 and pylint
run: |
poetry run flake8 ccsds
poetry run pylint ccsds
test:
runs-on: ubuntu-latest
container:
image: python:3.12-slim
steps:
- uses: actions/checkout@v4
- name: Install build tools
run: apt-get update && apt-get install -y gcc build-essential
- name: Install Poetry
run: pip install poetry
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest
publish:
needs: [lint, test]
runs-on: ubuntu-latest
container:
image: python:3.12-slim
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Install build tools
run: apt-get update && apt-get install -y gcc build-essential
- name: Install Poetry
run: pip install poetry
- name: Install dependencies
run: poetry install
- name: Build and publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish --build --no-interaction --repository testpypi