Skip to content

Commit

Permalink
Test GH actions workflow (#21)
Browse files Browse the repository at this point in the history
* go mod vendor

* update build and version to 1.0.0-rc.2

* add Test workflow for every push to the repo
  • Loading branch information
patrislav authored Feb 16, 2024
1 parent 80f65eb commit 8e1b338
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 12 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on:
push:
branches:
- "**"
pull_request:
branches:
- "**"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21.x' ]

env:
CGO_ENABLED: 0

steps:
- uses: actions/checkout@v3

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

- name: Vet
run: go vet

- name: Build
run: go build -v ./cmd/waas-auth

- name: Test
run: go test -v ./...
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ENV CONFIG=./etc/waas-auth.conf
CMD ["make", "run"]


FROM ghcr.io/0xsequence/eiffel:v0.2.0@sha256:b696e86ce1b42c14503973a7dc2893b08dc44ce5cbf41242b8afe6abe3b12077
FROM ghcr.io/0xsequence/eiffel:v0.3.0@sha256:d4aa946d7eb587e0554123efc3eaa5830a1428b0325ea239fe489e372f573dfe

ARG ENV_ARG=dev2

Expand Down
13 changes: 3 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@ TOP := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SHELL = bash -o pipefail
TEST_FLAGS ?= -v

GITTAG ?= $(shell git describe --exact-match --tags HEAD 2>/dev/null || :)
GITBRANCH ?= $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null || :)
LONGVERSION ?= $(shell git describe --tags --long --abbrev=8 --always HEAD)$(echo -$GITBRANCH | tr / - | grep -v '\-master' || :)
VERSION ?= $(if $(GITTAG),$(GITTAG),$(LONGVERSION))
GITCOMMIT ?= $(shell git log -1 --date=iso --pretty=format:%H)
GITCOMMITDATE ?= $(shell git log -1 --date=iso --pretty=format:%cd)
GITCOMMITAUTHOR ?= $(shell git log -1 --date=iso --pretty="format:%an")

VERSION := $(shell grep -o 'VERSION = "[^"]*' $(TOP)/version.go | cut -d'"' -f2)

define run
@go run github.com/goware/rerun/cmd/rerun -watch ./ -ignore vendor bin tests data/schema -run \
Expand Down Expand Up @@ -63,7 +56,7 @@ test: test-clean
test-clean:
GOGC=off go clean -testcache

eif:
eif: clean
mkdir -p bin
docker build --platform linux/amd64 --build-arg ENV_ARG=next -t waas-authenticator-builder .
docker run --platform linux/amd64 -v bin:/out waas-authenticator-builder
docker run --platform linux/amd64 -v $(TOP)/bin:/out waas-authenticator-builder waas-auth.$(VERSION)
20 changes: 20 additions & 0 deletions vendor/github.com/0xsequence/go-sequence/message.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package waasauthenticator

const VERSION = "1.0.0-rc.1"
const VERSION = "1.0.0-rc.2"

0 comments on commit 8e1b338

Please sign in to comment.