swap over the remaining go setup scripts (#957)

## Type of change

- [x] 💻 CI/Deployment

## Issue(s)

* #790

## Test Plan

- [x] 💚 E2E
This commit is contained in:
Keepers 2022-09-27 11:12:14 -06:00 committed by GitHub
parent 0a629e0807
commit 9357d6b6ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 70 deletions

View File

@ -10,38 +10,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3
# check out the repo
- name: Repo Code Checkout
uses: actions/checkout@v3
with: with:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
# Get values for cache paths to be used in later steps - name: Setup Golang with cache
- id: go-cache-paths uses: magnetikonline/action-golang-cache@v3
working-directory: ./src
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: Golang Setup
uses: actions/setup-go@v3
with: with:
go-version: 1.18 go-version-file: src/go.mod
cache: true
cache-dependency-path: src/go.sum
# download packages
- name: Cache Go Mod
uses: actions/cache@v3
id: cache
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- name: Run go mod download
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./src
run: go mod download
# sets the maximimum time to now-30m. # sets the maximimum time to now-30m.
# CI test have a 10 minute timeout. # CI test have a 10 minute timeout.

View File

@ -17,37 +17,14 @@ jobs:
if: needs.precheck.outputs.fileschanged == 'true' if: needs.precheck.outputs.fileschanged == 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Repo Code Checkout - uses: actions/checkout@v3
uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.ref }} ref: ${{ github.event.pull_request.head.ref }}
# Get values for cache paths to be used in later steps - name: Setup Golang with cache
- id: go-cache-paths uses: magnetikonline/action-golang-cache@v3
working-directory: ./src
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- name: Golang Setup
uses: actions/setup-go@v3
with: with:
go-version: 1.18 go-version-file: src/go.mod
cache: true
cache-dependency-path: src/go.sum
# download packages
- name: Cache Go Mod
uses: actions/cache@v3
id: cache
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- name: Run go mod download
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./src
run: go mod download
# run the markdown generator # run the markdown generator
- name: Generate Markdown - name: Generate Markdown
@ -78,16 +55,4 @@ jobs:
uses: juliangruber/approve-pull-request-action@v1 uses: juliangruber/approve-pull-request-action@v1
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.cpr.outputs.pull-request-number }} number: ${{ steps.cpr.outputs.pull-request-number }}
# for the future, if we create a PAT
# https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
# # make the PR auto-merge
# - name: Enable Pull Request Automerge
# if: steps.cpr.outputs.pull-request-operation == 'created'
# uses: peter-evans/enable-pull-request-automerge@v2
# with:
# token: ${{ secrets.PAT }}
# pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
# merge-method: squash

View File

@ -22,8 +22,7 @@ jobs:
env: env:
PLATFORMS: linux/amd64,linux/arm64 PLATFORMS: linux/amd64,linux/arm64
steps: steps:
- name: Checkout repository - uses: actions/checkout@v3
uses: actions/checkout@v3
- name: Build Corso Binaries - name: Build Corso Binaries
run: > run: >