feat: add devcontainer for py 3.11 #183
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Test and Release | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
tests: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.6", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
python -m pip install -r requirements-dev.txt | |
- name: Lint | |
run: | | |
flake8 . --count --exit-zero --show-source --statistics | |
isort --diff --check-only src | |
- name: Tests | |
env: | |
SQLITE_CONNECTION_STRING: ${{ vars.SQLITE_CONNECTION_STRING }} | |
SQLITE_USER: ${{ secrets.SQLITE_USER }} | |
SQLITE_PASSWORD: ${{ secrets.SQLITE_PASSWORD }} | |
SQLITE_API_KEY: ${{ secrets.SQLITE_API_KEY }} | |
SQLITE_HOST: ${{ vars.SQLITE_HOST }} | |
SQLITE_DB: ${{ vars.SQLITE_DB }} | |
SQLITE_PORT: ${{ vars.SQLITE_PORT }} | |
run: | | |
pytest --cov -v src/tests | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
release: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
needs: tests | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
- name: Set version | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
python -m pip install -r requirements-dev.txt | |
bump2version patch | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
force: true | |
tags: true |