Skip to content

Commit

Permalink
Use github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
  • Loading branch information
piotrpio committed Feb 13, 2025
1 parent e203089 commit a526e6c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 20 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: ci
on:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Run linters
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
$(exit $(go fmt ./... | wc -l))
go vet ./...
test:
runs-on: ubuntu-latest-8-cores

strategy:
matrix:
go: [ "1.16", "1.23" ]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Test and coverage
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
if [ "${{ matrix.go }}" = "1.23" ]; then
go test -v -covermode=count -coverprofile=coverage.out ./...
else
go test -v -race
fi
- name: Coveralls
if: matrix.go == '1.23'
uses: coverallsapp/github-action@v2
with:
file: coverage.out
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions unique_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build !race
// +build !race

package nuid
Expand Down

0 comments on commit a526e6c

Please sign in to comment.