This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
Update README.md #50
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
name: Main Test | |
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 |