diff --git a/.github/actions/setup-tools/action.yml b/.github/actions/setup-tools/action.yml new file mode 100644 index 0000000..8b502b7 --- /dev/null +++ b/.github/actions/setup-tools/action.yml @@ -0,0 +1,27 @@ +name: Setup tools +description: Installs all tools necessary for building and testing the project. + +runs: + using: "composite" + steps: + - name: Setup mise + uses: jdx/mise-action@v2 + + - name: Go cache paths + id: go-cache-paths + shell: sh + run: | + echo "::set-output name=go-build::$(go env GOCACHE)" + echo "::set-output name=go-mod::$(go env GOMODCACHE)" + + - name: Go build cache + uses: actions/cache@v2 + with: + path: ${{ steps.go-cache-paths.outputs.go-build }} + key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} + + - name: Go mod cache + uses: actions/cache@v2 + with: + path: ${{ steps.go-cache-paths.outputs.go-mod }} + key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index e1ad159..add81a6 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -71,9 +71,8 @@ jobs: with: lfs: true ref: ${{ env.PR_COMMIT_SHA }} - - uses: jdx/mise-action@v2 - with: - experimental: true # [default: false] enable experimental features + - name: Setup tools + uses: ./.github/actions/setup-tools - id: version name: Set Provider Version uses: pulumi/provider-version-action@v1 @@ -165,7 +164,8 @@ jobs: with: lfs: true ref: ${{ env.PR_COMMIT_SHA }} - - uses: jdx/mise-action@v2 + - name: Setup tools + uses: ./.github/actions/setup-tools - id: version name: Set Provider Version uses: pulumi/provider-version-action@v1 @@ -237,9 +237,8 @@ jobs: with: lfs: true ref: ${{ env.PR_COMMIT_SHA }} - - uses: jdx/mise-action@v2 - with: - experimental: true # [default: false] enable experimental features + - name: Setup tools + uses: ./.github/actions/setup-tools - id: version name: Set Provider Version uses: pulumi/provider-version-action@v1 @@ -335,9 +334,6 @@ jobs: with: lfs: true ref: ${{ env.PR_COMMIT_SHA }} - - uses: jdx/mise-action@v2 - with: - experimental: true # [default: false] enable experimental features - env: - MISE_TRACE: "1" + - name: Setup tools + uses: ./.github/actions/setup-tools - run: make lint