Skip to content

Commit

Permalink
ci(actions): update the actions used in the pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
danvergara committed Jun 16, 2022
1 parent cd00534 commit 3c3ba3b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 31 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
goVer: [1.13, 1.14, 1.15, 1.16]
goVer: [1.16, 1.17, 1.18]
# Defines the platform for each test run.
runs-on: ${{ matrix.os }}
# define the container services used to run integration tests
Expand Down Expand Up @@ -38,21 +38,16 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
# Checks out our code locally so we can work with the files.
- name: Checkout code
uses: actions/checkout@v3

# The steps that will be run through for each version and platform combination.
- name: Set up Go ${{ matrix.goVer }}
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.goVer }}
# Checks out our code locally so we can work with the files.
- name: Checkout code
uses: actions/checkout@v2
# Caches downloaded modules
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
cache: true

# Runs go test ./... against postgres container
- name: Test Postgres
Expand Down
37 changes: 18 additions & 19 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,42 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
goVer: [1.13, 1.14, 1.15, 1.16]
goVer: [1.16, 1.17, 1.18]
# Defines the platform for each test run.
runs-on: ${{ matrix.os }}
steps:
# Checks out our code locally so we can work with the files.
- name: Checkout code
uses: actions/checkout@v3

# The steps that will be run through for each version and platform combination.
- name: Set up Go ${{ matrix.goVer }}
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.goVer }}
# Checks out our code locally so we can work with the files.
- name: Checkout code
uses: actions/checkout@v2
# Caches downloaded modules
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
cache: true

# Runs go test ./...
- name: Test
run: go test -v -short ./...

lint:
runs-on: ubuntu-latest
steps:
# Checks out our code locally so we can work with the files.
- name: Checkout code
uses: actions/checkout@v3

# Installs go using a single version.
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.16.x
# Checks out our code locally so we can work with the files.
- name: Checkout code
uses: actions/checkout@v2
go-version: 1.18
check-latest: true

# Runs the default linters provided by golangci-lint plus golint and godot.
- name: Run linters
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.39
version: v1.46
args: --enable=golint --enable=godot

0 comments on commit 3c3ba3b

Please sign in to comment.