v2.1.1 #9
Workflow file for this run
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
# -*- coding: utf-8 -*- | |
# Copyright (C) 2023 Benjamin Thomas Schwertfeger | |
# GitHub: https://github.com/btschwertfeger | |
# | |
# Workflow that gets triggered, when a release was created in the | |
# GitHub UI. This enables the upload of the python-kraken-sdk | |
# for the latest tag to PyPI. | |
# | |
name: PyPI Production Release | |
on: | |
release: | |
types: [created] | |
jobs: | |
## =========================================================================== | |
## Run pre-commit - just to make sure that the code is still | |
## in the proper format | |
## | |
Pre-Commit: | |
uses: ./.github/workflows/_pre_commit.yaml | |
## =========================================================================== | |
## Discover vulnerabilities | |
## | |
CodeQL: | |
uses: ./.github/workflows/_codeql.yaml | |
## =========================================================================== | |
## Build the package - for all Python versions | |
## | |
Build: | |
uses: ./.github/workflows/_build.yaml | |
needs: [Pre-Commit] | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
python-version: ["3.11"] | |
with: | |
os: ${{ matrix.os }} | |
python-version: ${{ matrix.python-version }} | |
## =========================================================================== | |
## Build the documentation | |
## | |
Build-Doc: | |
needs: [Pre-Commit] | |
uses: ./.github/workflows/_build_doc.yaml | |
with: | |
os: "ubuntu-latest" | |
python-version: "3.11" | |
## =========================================================================== | |
## Run the Spot tests | |
## | |
## (public endpoints) | |
## | |
Test-Spot-Public: | |
needs: [Build] | |
uses: ./.github/workflows/_test_spot_public.yaml | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.11"] | |
with: | |
os: ${{ matrix.os }} | |
python-version: ${{ matrix.python-version }} | |
## | |
## (private endpoints) | |
Test-Spot-Private: | |
needs: [Build] | |
uses: ./.github/workflows/_test_spot_private.yaml | |
strategy: | |
max-parallel: 1 # to avoid failing tests because of API Rate limits | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.11"] | |
with: | |
os: ${{ matrix.os }} | |
python-version: ${{ matrix.python-version }} | |
secrets: inherit | |
## =========================================================================== | |
## Run the Futures tests | |
## | |
## (public endpoints) | |
Test-Futures-Public: | |
needs: [Build] | |
uses: ./.github/workflows/_test_futures_public.yaml | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.11"] | |
with: | |
os: ${{ matrix.os }} | |
python-version: ${{ matrix.python-version }} | |
## | |
## (private endpoints) | |
Test-Futures-Private: | |
needs: [Build] | |
uses: ./.github/workflows/_test_futures_private.yaml | |
strategy: | |
max-parallel: 1 # to avoid failing tests because of API Rate limits | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.11"] | |
with: | |
os: ${{ matrix.os }} | |
python-version: ${{ matrix.python-version }} | |
secrets: inherit | |
## =========================================================================== | |
## Upload the python-kraken-sdk to Test PyPI | |
## | |
UploadTestPyPI: | |
needs: | |
- Test-Spot-Public | |
- Test-Spot-Private | |
- Test-Futures-Public | |
- Test-Futures-Private | |
name: Upload the current release to Test PyPI | |
uses: ./.github/workflows/_pypi_publish.yaml | |
with: | |
REPOSITORY_URL: https://test.pypi.org/legacy/ | |
secrets: | |
API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
## =========================================================================== | |
## Upload the python-kraken-sdk to Production PyPI | |
## | |
UploadPyPI: | |
needs: [UploadTestPyPI] | |
name: Upload the current release to PyPI | |
uses: ./.github/workflows/_pypi_publish.yaml | |
with: | |
REPOSITORY_URL: https://upload.pypi.org/legacy/ | |
secrets: | |
API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} |