test: Add unit tests to improve test coverage for additional packages #1174
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: Default | |
on: | |
merge_group: | |
push: | |
branches: | |
- releases/* | |
- main | |
pull_request: | |
types: [ assigned, opened, synchronize, reopened, labeled ] | |
permissions: | |
contents: write | |
pull-requests: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
Ci: | |
runs-on: "formance-runner" | |
steps: | |
- uses: 'actions/checkout@v4' | |
with: | |
fetch-depth: 0 | |
- name: Setup Env | |
uses: ./.github/actions/env | |
- run: > | |
/nix/var/nix/profiles/default/bin/nix --extra-experimental-features "nix-command" --extra-experimental-features "flakes" | |
develop --impure --command just pre-commit | |
- name: Get changed files | |
id: changed-files | |
shell: bash | |
run: | | |
hasChanged=$(git status --porcelain) | |
if (( $(echo ${#hasChanged}) != 0 )); then | |
git status | |
echo "There are changes in the repository" | |
exit 1 | |
fi | |
- run: > | |
/nix/var/nix/profiles/default/bin/nix --extra-experimental-features "nix-command" --extra-experimental-features "flakes" | |
develop --impure --command just tests | |
- name: Upload coverage reports to Codecov with GitHub Action | |
uses: codecov/codecov-action@v5.1.2 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Validate Dependabot PR | |
if: github.event.pull_request.user.login == 'dependabot[bot]' | |
run: gh pr review $PR_URL --approve -b "Auto approve dependencies bump PR" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Merge Dependabot PR | |
if: github.event.pull_request.user.login == 'dependabot[bot]' | |
run: gh pr merge $PR_URL | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GH_TOKEN: ${{secrets.NUMARY_GITHUB_TOKEN}} |