Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Increase test coverage and fix audience only tails #26

Increase test coverage and fix audience only tails

Increase test coverage and fix audience only tails #26

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
test:
name: Run Pytest
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # If you have any specific requirements for your project
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run Pytest
run: |
make test/wasm
pytest
coverage:
name: Generate code coverage report
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # If you have any specific requirements for your project
- name: Install Code Climate reporter
run: |
sudo curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
sudo chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run coverage
run: |
make test/wasm
pip install coverage
coverage run --source=streamdal -m pytest && coverage xml
- name: Upload coverage information
run: |
./cc-test-reporter format-coverage -t coverage.py
GIT_BRANCH=main ./cc-test-reporter after-build \
-r ${{ secrets.CC_TEST_REPORTER_ID }} \
-t coverage.py
build:
outputs:
new_tag: ${{ steps.create_tag.outputs.new_tag }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Generate new tag (dry run)
uses: mathieudutour/[email protected]
id: get_new_version
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
dry_run: true
- name: Build python dist
run: |
sed -i "s/version=\".*\"/version=\"${{ steps.get_new_version.outputs.new_version }}\"/" streamdal/__init__.py
sed -i "s/version=.*/version='${{ steps.get_new_version.outputs.new_version }}',/" setup.py
python3 setup.py sdist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Create tag
uses: mathieudutour/[email protected]
id: create_tag
with:
github_token: ${{ secrets.GITHUB_TOKEN }}