Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
name: Run CI Tests
on: [push]
env:
GO_VERSION: 1.19.1
name: Test and Lint

on:
pull_request:
push:
branches: ["main"]

jobs:
run-tests:
runs-on: ubuntu-22.04
test:
runs-on: ubuntu-latest

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it better to run on fix version to avoid external things affecting the outcome of the tests?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The library doesn't have any real OS dependency, so using this means we do not have to keep this value updated and is the same approach we are using on other libraries and Go versions (oldstable and stable). The images themselves go through updates that could in theory break tests that rely heavily on OS and installed packages versions.

strategy:
matrix:
go-version: ["oldstable", "stable"]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{env.GO_VERSION}}
go-version: ${{ matrix.go-version }}
- name: Run Go Vet
run: |
go vet ./...
Expand Down
Loading