Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dataclasses #99

Merged
merged 12 commits into from
May 24, 2022
Merged
82 changes: 41 additions & 41 deletions .github/workflows/code-analysis.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: Code Analysis

on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: 30 0 * * 1

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language:
- python

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
name: Code Analysis
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: 30 0 * * 1
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language:
- python
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
100 changes: 50 additions & 50 deletions .github/workflows/publishing.yaml
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
name: Publishing

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

jobs:
pypi:
name: Publish to PyPI
strategy:
fail-fast: false
matrix:
python-version:
- '3.10'
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
#----------------------------------------------
- name: Checkout repository
uses: actions/checkout@v3
#----------------------------------------------
- name: Setup python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
#----------------------------------------------
- name: Load cached venv
id: cached-venv
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install project
run: poetry install --no-interaction
#----------------------------------------------
- name: Set PyPI Token
run: poetry config pypi-token.pypi '${{ secrets.PYPI_TOKEN }}'
- name: Publish Project
run: poetry publish --build
name: Publishing
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
pypi:
name: Publish to PyPI
strategy:
fail-fast: false
matrix:
python-version:
- '3.10'
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
#----------------------------------------------
- name: Checkout repository
uses: actions/checkout@v3
#----------------------------------------------
- name: Setup python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
#----------------------------------------------
- name: Load cached venv
id: cached-venv
uses: actions/cache@v3.0.2
with:
path: .venv
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install project
run: poetry install --no-interaction
#----------------------------------------------
- name: Set PyPI Token
run: poetry config pypi-token.pypi '${{ secrets.PYPI_TOKEN }}'
- name: Publish Project
run: poetry publish --build
116 changes: 58 additions & 58 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
name: Testing

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
tox:
name: Tox Tests
strategy:
fail-fast: false
matrix:
python-version:
- 3.7
- 3.8
- 3.9
- '3.10'
os:
- ubuntu-latest
- macos-latest
- windows-latest
env:
COMICVINE_API_KEY: Testing-Key
runs-on: ${{ matrix.os }}
steps:
#----------------------------------------------
- name: Checkout repository
uses: actions/checkout@v3
#----------------------------------------------
- name: Setup python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
#----------------------------------------------
- name: Load cached venv
id: cached-venv
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install project
run: poetry install --no-interaction
#----------------------------------------------
- name: Test with tox
run: poetry run tox -e py
name: Testing
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tox:
name: Tox Tests
strategy:
fail-fast: false
matrix:
python-version:
- 3.7
- 3.8
- 3.9
- '3.10'
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
#----------------------------------------------
- name: Checkout repository
uses: actions/checkout@v3
#----------------------------------------------
- name: Setup python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
#----------------------------------------------
- name: Load cached venv
id: cached-venv
uses: actions/cache@v3.0.2
with:
path: .venv
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install project
run: poetry install --no-interaction
#----------------------------------------------
- name: Test with tox
env:
COMICVINE_API_KEY: Testing-Key
run: poetry run tox -e py
Loading