From 2aba4520acfb09c7caa323236ecb6e1c5acf9cd0 Mon Sep 17 00:00:00 2001 From: Jay Faulkner Date: Wed, 1 Jun 2022 11:33:41 -0700 Subject: [PATCH] DRY attempt #2 --- .github/workflows/go-setup.yml | 20 -------------------- .github/workflows/go-setup/action.yml | 13 +++++++++++++ .github/workflows/go.yml | 2 +- 3 files changed, 14 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/go-setup.yml create mode 100644 .github/workflows/go-setup/action.yml diff --git a/.github/workflows/go-setup.yml b/.github/workflows/go-setup.yml deleted file mode 100644 index 786dfea61cd..00000000000 --- a/.github/workflows/go-setup.yml +++ /dev/null @@ -1,20 +0,0 @@ -on: [workflow_call] - -jobs: - v1: - # TODO(JayF): Configure this to only run when golang code has changed - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - go: [ '1.16', '1.18' ] - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-go@v3 - with: - go-version: ${{ matrix.go }} - cache: true - - - name: Setup dependencies - run: make download \ No newline at end of file diff --git a/.github/workflows/go-setup/action.yml b/.github/workflows/go-setup/action.yml new file mode 100644 index 00000000000..421e1777706 --- /dev/null +++ b/.github/workflows/go-setup/action.yml @@ -0,0 +1,13 @@ +name: "Setup go environment for tests" +description: "Sets up go environment and installs deps for go testing of armada" + +runs: + using: "composite" + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go }} + cache: true + - name: Setup dependencies + run: make download \ No newline at end of file diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8ee52c3c202..9577c445767 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -9,7 +9,7 @@ jobs: matrix: go: [ '1.16', '1.18' ] steps: - - uses: ./.github/workflows/go-setup.yml + - uses: ./.github/workflows/go-setup - name: make code-checks run: make code-checks