diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml deleted file mode 100644 index 0095b9bca1e..00000000000 --- a/.github/workflows/audit.yml +++ /dev/null @@ -1,22 +0,0 @@ -#! Auto synced from Shared CI Resources repository -#! Don't change this file, instead change it in github.com/GaloyMoney/concourse-shared - -name: Audit - -on: - pull_request: - branches: [main] - -jobs: - audit: - name: Audit - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@v4 - - name: Run the Magic Nix Cache - uses: DeterminateSystems/magic-nix-cache-action@v2 - - run: cd core/api && nix develop -c pnpm install --frozen-lockfile - - name: Run check code - run: cd core/api && nix develop -c make audit diff --git a/.github/workflows/buck2-audit.yaml b/.github/workflows/buck2-audit.yaml new file mode 100644 index 00000000000..d7d659808bd --- /dev/null +++ b/.github/workflows/buck2-audit.yaml @@ -0,0 +1,37 @@ +name: Buck2 test +on: + pull_request: + branches: [main] + types: [opened, synchronize, labeled, unlabeled] + +jobs: + buck2-test: + name: Buck2 Test + runs-on: ubuntu-latest + steps: + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v4 + - name: Run the Magic Nix Cache + uses: DeterminateSystems/magic-nix-cache-action@v2 + - uses: actions/checkout@v3 + - name: Prepare Buck2 test args from labels + id: prepare_args + run: | + ARGS="" + cat < labels.json + ${{ toJSON(github.event.pull_request.labels.*.name) }} + EOF + for LABEL in dashboard consent core; do + case "$LABEL" in + dashboard|consent) + ARGS+=" //apps/$LABEL:audit" + ;; + core) + ARGS+=" //core/api:audit" + ;; + esac + done + echo "Prepared args: $ARGS" + echo "args=$ARGS" >> "$GITHUB_OUTPUT" + - name: Buck2 test + run: nix develop -c buck2 test ${{ steps.prepare_args.outputs.args }}