Adding cache to test (#1426)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
18
.github/workflows/permissions.yml
vendored
18
.github/workflows/permissions.yml
vendored
@@ -27,7 +27,25 @@ jobs:
|
||||
node-version: '17'
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: Make assets
|
||||
run: |
|
||||
make assets
|
||||
|
||||
@@ -67,7 +67,51 @@ __init__() {
|
||||
export GOPATH=/tmp/gopath
|
||||
export PATH=${PATH}:${GOPATH}/bin
|
||||
|
||||
go install github.com/minio/mc@latest
|
||||
ARCH="`uname -m`"
|
||||
case $ARCH in
|
||||
'i386')
|
||||
ARCH='amd64'
|
||||
alias ls='ls --color=auto'
|
||||
;;
|
||||
'x86_64')
|
||||
ARCH='amd64'
|
||||
alias ls='ls -G'
|
||||
;;
|
||||
'arm')
|
||||
ARCH='arm64'
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
echo $ARCH
|
||||
|
||||
|
||||
OS="`uname`"
|
||||
case $OS in
|
||||
'Linux')
|
||||
OS='linux'
|
||||
alias ls='ls --color=auto'
|
||||
;;
|
||||
'FreeBSD')
|
||||
OS='freebsd'
|
||||
alias ls='ls -G'
|
||||
;;
|
||||
'WindowsNT')
|
||||
OS='windows'
|
||||
;;
|
||||
'Darwin')
|
||||
OS='darwin'
|
||||
;;
|
||||
'SunOS')
|
||||
OS='solaris'
|
||||
;;
|
||||
'AIX') ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
curl -sLO "https://dl.min.io/client/mc/release/$OS-$ARCH/mc" -o mc
|
||||
chmod +x mc
|
||||
mv mc /usr/local/bin
|
||||
|
||||
add_alias
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user