Skip to content

add cache again

add cache again #15

Workflow file for this run

name: Go test
on: [push]
jobs:
test-cache:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.17', '1.18', '1.19', '1.20', '1.21' ]
mongodb-version: [ '4.4', '5.0', '6.0', '7.0' ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Start MongoDB
uses: supercharge/mongodb-github-action@v1
with:
mongodb-version: ${{ matrix.mongodb-version }}
mongodb-replica-set: mgm-rs
mongodb-db: mgmdb
- uses: actions/cache@v3
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
~\AppData\Local\go-build
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- run: go test ./...