-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
29 additions
and
112 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- develop | ||
- main | ||
|
||
jobs: | ||
|
||
ci: | ||
Quality: | ||
strategy: | ||
fail-fast: false | ||
fail-fast: true | ||
matrix: | ||
python-version: [3.8, 3.9] | ||
os: [ubuntu-latest] | ||
|
@@ -22,36 +20,35 @@ jobs: | |
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: Gr1N/setup-poetry@v8 | ||
with: | ||
poetry-version: "1.4.0" | ||
- uses: actions/cache@v2 | ||
- name: Install Python Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | ||
- run: poetry --version | ||
- name: Prepare variables | ||
id: vars | ||
run: | | ||
echo "version=$(awk '/version/{print $NF}' pyproject.toml | sed 's/\"//g')" >> $GITHUB_OUTPUT | ||
poetry-version: 1.4.0 | ||
- name: Configure poetry | ||
shell: bash | ||
run: python -m poetry config virtualenvs.in-project true | ||
- name: View poetry version | ||
run: poetry --version | ||
- name: Install dependencies | ||
run: make install | ||
run: | | ||
python -m poetry install | ||
- name: Run check | ||
run: make test | ||
- name: Run complexity-baseline | ||
run: make complexity-baseline | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
- name: Run complexity baseline | ||
run: make complexity | ||
|
||
Release: | ||
needs: Quality | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./reports/coverage.xml | ||
- name: Code Coverage Summary Report | ||
uses: irongut/[email protected] | ||
fetch-depth: 0 | ||
- name: Python Semantic Release | ||
uses: relekang/python-semantic-release@master | ||
with: | ||
filename: reports/coverage.xml | ||
badge: true | ||
fail_below_min: true | ||
format: markdown | ||
output: both | ||
thresholds: 95 100 | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
repository_username: __token__ | ||
repository_password: ${{ secrets.PYPI_API_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.