Skip to content

Merge pull request #18 from hokus15/dependabot/pip/obd-0.7.2 #5

Merge pull request #18 from hokus15/dependabot/pip/obd-0.7.2

Merge pull request #18 from hokus15/dependabot/pip/obd-0.7.2 #5

Workflow file for this run

name: Test & Release
on:
push:
branches:
- master
jobs:
test:
name: Python ${{ matrix.python-version }} tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r requirements.txt
- name: Lint with flake8
run: |
flake8 .
- name: Test with unittest
run: |
python -m unittest discover -s test -p "test_*.py"
release:
name: Semantic Release
runs-on: ubuntu-latest
concurrency: push
needs: test
permissions:
contents: write
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing in PyPi
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@v9.3.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package distributions to GitHub Releases
id: github-release
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}