Skip to content

Instantly share code, notes, and snippets.

@initcron
Created May 20, 2025 06:29
Show Gist options
  • Save initcron/2116f151889231d9eba8472b8adee1e1 to your computer and use it in GitHub Desktop.
Save initcron/2116f151889231d9eba8472b8adee1e1 to your computer and use it in GitHub Desktop.
test:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
job: [unit-test, sca, sbom]
name: Run ${{ matrix.job }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Run ${{ matrix.job }}
run: |
if [ "${{ matrix.job }}" == "unit-test" ]; then
mvn clean test
elif [ "${{ matrix.job }}" == "sca" ]; then
sleep 4
elif [ "${{ matrix.job }}" == "sbom" ]; then
sleep 2
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment