remove goerli from TS #770
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
name: Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
PROVIDER_URI_MAINNET: ${{ secrets.PROVIDER_URI_MAINNET }} | |
PROVIDER_URI_SEPOLIA: ${{ secrets.PROVIDER_URI_SEPOLIA }} | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.9, 3.11] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "poetry" | |
- name: Install dependencies | |
working-directory: ./api | |
run: poetry install | |
- name: Run tests mocked | |
working-directory: ./api | |
run: poetry run pytest -vv --durations=0 | |
- name: Run tests | |
working-directory: ./api | |
run: MONKEYPATCH=0 poetry run pytest -vv --durations=0 | |
add_badge: | |
runs-on: ubuntu-latest | |
needs: test | |
permissions: | |
contents: write | |
if: ${{ github.event_name == 'pull_request' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
cache: "poetry" | |
- name: Install dependencies | |
working-directory: ./api | |
run: poetry install | |
- name: Run tests mocked | |
working-directory: ./api | |
run: poetry run pytest -vv --durations=0 --cov-report term-missing --cov=./ | |
- name: Generate coverage badge | |
working-directory: ./api | |
run: poetry run coverage-badge -fo ../coverage_badge.svg | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
author_name: github-actions | |
author_email: [email protected] | |
message: 'Update coverage badge' | |
add: 'coverage_badge.svg' |