Branch build by goldstack 🚀 #354
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Branch build | |
| run-name: Branch build by ${{ github.actor }} 🚀 | |
| on: [push] | |
| jobs: | |
| build: | |
| name: '🛠️ Build' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: ./.github/actions/goldstack-setup | |
| - run: | | |
| yarn build | |
| lint: | |
| name: '🖋️ Prettier and Lint' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: ./.github/actions/goldstack-setup | |
| - run: | | |
| yarn format-check | |
| yarn lint | |
| get-packages: | |
| name: '📦 Get Packages' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| outputs: | |
| packages: ${{ steps.set-packages.outputs.packages }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - id: set-packages | |
| run: | | |
| PACKAGES=$(ls -d packages/*/ | cut -f2 -d'/' | jq -R -s -c 'split("\n")[:-1]') | |
| echo "packages=$PACKAGES" >> $GITHUB_OUTPUT | |
| test: | |
| name: '🔍 Tests (${{ matrix.package }})' | |
| needs: get-packages | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: ${{ fromJson(needs.get-packages.outputs.packages) }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-java@v4 # used for local DynamoDB | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - uses: ./.github/actions/goldstack-setup | |
| - run: | | |
| cd packages/${{ matrix.package }} | |
| yarn test | |
| audit: | |
| name: '🔒 NPM Audit' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: ./.github/actions/goldstack-setup | |
| - run: | | |
| yarn npm audit --all --recursive --severity critical |