Skip to content

Commit

Permalink
Last changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ntn-x2 committed Aug 29, 2024
1 parent fc08aea commit 3295fb0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ jobs:
get-commit-head:
name: Get HEAD commit message
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
outputs:
headCommitMsg: ${{ steps.get-head-commit-message.outputs.headCommitMsg || 'No commit message' }}
headCommitMsg: ${{ steps.get-head-commit-message.outputs.headCommitMsg }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.ref }}

- name: Get HEAD commit message
id: get-head-commit-message
Expand All @@ -35,7 +34,7 @@ jobs:
name: Run Clippy checks
runs-on: ubuntu-latest
needs: get-commit-head
if: ${{ needs.get-commit-head.outputs.headCommitMsg && !contains(needs.get-commit-head.outputs.headCommitMsg, 'ci-skip-rust') }}
if: ${{ !contains(needs.get-commit-head.outputs.headCommitMsg, 'ci-skip-rust') }}

strategy:
matrix:
Expand Down Expand Up @@ -79,7 +78,7 @@ jobs:
container:
image: paritytech/ci-unified:bullseye-1.74.0
needs: get-commit-head
if: ${{ needs.get-commit-head.outputs.headCommitMsg && !contains(needs.get-commit-head.outputs.headCommitMsg, 'ci-skip-rust') }}
if: ${{ !contains(needs.get-commit-head.outputs.headCommitMsg, 'ci-skip-rust') }}

steps:
- name: Checkout repository
Expand All @@ -101,7 +100,11 @@ jobs:
defaults:
run:
working-directory: ${{ env.working-dir }}
needs: cargo-clippy
needs:
- get-commit-head
- cargo-clippy
# Run this job if the `clippy` step completed successfully or was skipped, as long as the commit does not explicitly skip integration tests as well.
if: ${{ needs.cargo-clippy.result != 'failure' && !contains(needs.get-commit-head.outputs.headCommitMsg, 'ci-skip-integration-tests') }}

steps:
- name: Checkout repository
Expand Down

0 comments on commit 3295fb0

Please sign in to comment.