docs: added basic docs to github pages #21
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 and run tests 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 Integration | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- synchronize | |
jobs: | |
test: | |
strategy: | |
max-parallel: 3 | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: [3.11] | |
defaults: | |
run: | |
shell: bash | |
runs-on: ${{ matrix.os }} | |
environment: ${{ github.base_ref }} | |
steps: | |
#---------------------------------------------- | |
# ----------- check-out repo ------------ | |
#---------------------------------------------- | |
- uses: actions/checkout@v4 | |
#---------------------------------------------- | |
# ------------ setup python ----------- | |
#---------------------------------------------- | |
- name: 🔧 Setup Python | |
id: setup-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
#---------------------------------------------- | |
# ----- install & configure poetry ----- | |
#---------------------------------------------- | |
- name: 📜 Install Poetry | |
run: | | |
python -m pip install -U pip poetry | |
poetry --version | |
#---------------------------------- | |
# ----- load cached venv ----- | |
#---------------------------------- | |
- name: Load cached venv | |
id: cached-pip-wheels | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
#---------------------------------------------- | |
# ------------ install deps ------------ | |
#---------------------------------------------- | |
- name: Install dependencies | |
run: | | |
poetry install --no-interaction | |
#------------------------------------------------------ | |
# ------------ setup creds based on os ------------ | |
#------------------------------------------------------ | |
- name: Setup creds based on os | |
run: | | |
if [[ "${{ runner.os }}" == "Windows" ]]; then | |
echo "CREDENTIALS_JSON=${{ secrets.PYTEST_CREDENTIALS_WIN }}" >> $GITHUB_ENV | |
elif [[ "${{ runner.os }}" == "macOS" ]]; then | |
echo "CREDENTIALS_JSON=${{ secrets.PYTEST_CREDENTIALS_MAC }}" >> $GITHUB_ENV | |
else | |
echo "CREDENTIALS_JSON=${{ secrets.PYTEST_CREDENTIALS_LINUX }}" >> $GITHUB_ENV | |
fi | |
#----------------------------------------------- | |
# ------------- run test suite ------------ | |
#----------------------------------------------- | |
- name: 🧪 Run tests | |
if: always() | |
run: | | |
echo $CREDENTIALS_JSON | base64 -d > ./tests/credentials/test_creds.json | |
make test | |
#---------------------------------------------- | |
# ------------ upload coverage ----------- | |
#---------------------------------------------- | |
- name: 📊 Upload coverage | |
if: runner.os == 'Linux' | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella |