Skip to content

Commit

Permalink
Workaround actions checkout not pulling latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
corentin-regent committed Mar 26, 2024
1 parent a50972e commit 327206a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Run tests
uses: ./.github/actions/test
Expand All @@ -67,14 +69,14 @@ jobs:
name: Report coverage
needs: test
runs-on: ubuntu-latest
env:
from_fork: ${{ github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}

steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}

- name: Setup
uses: ./.github/actions/setup
Expand All @@ -93,13 +95,11 @@ jobs:
run: poetry run coverage combine coverage-*/.coverage

- name: Generate coverage report
if: ${{ env.from_fork != 'true' }}
run: |
poetry run coverage xml -i
sed -i "s/home\/runner\/work\/rate-control\/rate-control/github\/workspace/g" coverage.xml
- name: Report to SonarCloud
if: ${{ env.from_fork != 'true' }}
uses: sonarsource/sonarcloud-github-action@v2
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand All @@ -114,6 +114,7 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4
ref: ${{ github.ref }}

- name: Setup
uses: ./.github/actions/setup
Expand Down Expand Up @@ -141,6 +142,7 @@ jobs:
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
ref: ${{ github.ref }}

- name: Setup
uses: ./.github/actions/setup
Expand Down

0 comments on commit 327206a

Please sign in to comment.