diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000..ea9aad5 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,7 @@ +coverage: + status: + project: + default: + target: 80% + base: auto + informational: false diff --git a/.github/workflows/post-pr.yml b/.github/workflows/post-pr.yml new file mode 100644 index 0000000..f7514c7 --- /dev/null +++ b/.github/workflows/post-pr.yml @@ -0,0 +1,31 @@ +name: Build main + +on: + push: + branches: [master] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Set up Python & install tools + run: | + sudo apt-get update + curl -sSL https://install.python-poetry.org | python3 - + curl -sL https://taskfile.dev/install.sh | sh + sudo mv ./bin/task /usr/local/bin + echo "$HOME/.local/bin" >> $GITHUB_PATH + + - name: Install dependencies + run: task install-deps + + - name: Run tests + run: task test + + - name: Upload coverage + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/pr.yml similarity index 93% rename from .github/workflows/ci.yml rename to .github/workflows/pr.yml index fa3577f..40909d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/pr.yml @@ -1,15 +1,13 @@ -name: CI +name: CI - Pull Request on: - push: - branches: [master] pull_request: branches: [master] jobs: test: runs-on: ubuntu-latest - + environment: ci-approval steps: - name: Checkout repo uses: actions/checkout@v4