Skip to content

Update SonarSource/sonarcloud-github-action digest to eb21172 #655

Update SonarSource/sonarcloud-github-action digest to eb21172

Update SonarSource/sonarcloud-github-action digest to eb21172 #655

Workflow file for this run

# A workflow that tests this action
name: CI test workflow
on:
pull_request:
branches: [main]
workflow_dispatch:
permissions:
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
name: Run the CI tests
steps:
- name: Harden Runner
uses: step-security/harden-runner@951b48540b429070694bc8abd82fd6901eb123ca
with:
egress-policy: block
disable-telemetry: true
allowed-endpoints: >
api.github.com:443
auth.docker.io:443
deb.debian.org:80
github.com:443
production.cloudflare.docker.com:443
registry-1.docker.io:443
registry.npmjs.org:443
security.debian.org:80
- name: Checkout
uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08
- name: Run test scripts
working-directory: ${{ github.workspace }}
id: test
shell: bash
run: |
chmod +x "test/test.sh"
rm -f "test/test-*.txt"
bash test/test.sh > test/test-result.txt
echo "test-result=$(grep "Test result:" ${{ github.workspace }}/test/test-result.txt)" >>"$GITHUB_OUTPUT"
continue-on-error: true
- name: Read test details file.
id: details
uses: juliangruber/read-file-action@386973d5b59f826915775874c7d1f82c4bbcfb07
with:
path: ${{ github.workspace }}/test/test-outputs.txt
- name: Update test script comment on PR under test
if: github.event_name == 'pull_request' && ( ${{ success() }} || ${{ failure() }} )
uses: thollander/actions-comment-pull-request@bc14ce351a6a25022a490f2be0570c700083a7fe
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: |
Testing script results from test/test.sh
${{ steps.test.outputs.test-result }}
<details><summary>Test script outputs from test/test.sh</summary>
<p>
${{ steps.details.outputs.content }}
</p>
</details>