From bc4cfa391b3b037f76eda46b1301aaea8ef27716 Mon Sep 17 00:00:00 2001 From: vindard <17693119+vindard@users.noreply.github.com> Date: Thu, 16 Nov 2023 15:13:30 -0400 Subject: [PATCH] build: move 'audit' check to 'test-unit' steps --- .github/workflows/buck2-audit.yaml | 37 ------------------------------ apps/consent/BUCK | 1 + apps/dashboard/BUCK | 1 + core/api/BUCK | 1 + 4 files changed, 3 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/buck2-audit.yaml diff --git a/.github/workflows/buck2-audit.yaml b/.github/workflows/buck2-audit.yaml deleted file mode 100644 index b60dc4ba3d..0000000000 --- a/.github/workflows/buck2-audit.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Buck2 audit -on: - pull_request: - branches: [main] - types: [opened, synchronize, labeled, unlabeled] - -jobs: - buck2-test: - name: Buck2 Audit - 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 audit 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 }} diff --git a/apps/consent/BUCK b/apps/consent/BUCK index bc012472c5..09bdcfe75b 100644 --- a/apps/consent/BUCK +++ b/apps/consent/BUCK @@ -82,6 +82,7 @@ eslint( test_suite( name = "test-unit", tests = [ + ":audit", ":lint", ], ) diff --git a/apps/dashboard/BUCK b/apps/dashboard/BUCK index e11904e5b2..ae4ee902ae 100644 --- a/apps/dashboard/BUCK +++ b/apps/dashboard/BUCK @@ -72,6 +72,7 @@ eslint( test_suite( name = "test-unit", tests = [ + ":audit", ":lint", ], ) diff --git a/core/api/BUCK b/core/api/BUCK index 6badc13e25..fd204748b5 100644 --- a/core/api/BUCK +++ b/core/api/BUCK @@ -158,6 +158,7 @@ madge_check( test_suite( name = "test-unit", tests = [ + ":audit", ":check-lint", ":check-type", ":check-yaml",