Skip to content

ci(COD-4237): no longer move the sample repository #691

ci(COD-4237): no longer move the sample repository

ci(COD-4237): no longer move the sample repository #691

name: Integration test
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
LW_ACCOUNT_NAME: ${{ secrets.LW_ACCOUNT_CAT }}
LW_API_KEY: ${{ secrets.LW_API_KEY_CAT }}
LW_API_SECRET: ${{ secrets.LW_API_SECRET_CAT }}
DEBUG: 'true'
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run action
id: run-action
uses: ./action
with:
target: push
sources: ${{ github.workspace }}/sample-repo
# debug: true
- name: Check run succeeded
env:
RUN_OUTPUT: ${{ steps.run-action.outputs.push-completed }}
run: |
if [ "$RUN_OUTPUT" == "true" ]; then
echo "Test run succeeded!"
else
echo "::error Test run failed!"
exit 1
fi
- name: Download results
uses: actions/download-artifact@v3
with:
name: results-push
path: artifact
- name: Check results
working-directory: artifact
run: |
cat sca.sarif
export SCA_RESULTS=`jq '.runs | map (.results | length) | add' sca.sarif`
expectedScaResults=5
echo "Got $SCA_RESULTS from SCA"
if [ "$SCA_RESULTS" != "$expectedScaResults" ]; then
echo "::error::Expected to have $expectedScaResults SCA results!"
exit 1
fi