Setup Frontend #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, run all tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: malaktest | |
ports: ["5432:5432"] | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
redis: | |
image: redis:latest | |
ports: | |
- "6379:6379" | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=tag::$(echo ${GITHUB_SHA:8}) | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version: ^1.22 | |
id: go | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Get and verify dependencies | |
# env: | |
# GONOPROXY: "github.com/ayinke-llc/malak/*" | |
# GONOSUMDB: "github.com/ayinke-llc/malak/*" | |
run: go mod download && go mod verify | |
- name: Build app to make sure there are zero issues | |
run: go build -o malak ./cmd | |
- name: Run all tests | |
run: go test -tags integration -v ./... | |
env: | |
TEST_POSTGRES_DSN: "postgresql://malaktest:postgres@localhost:5432/malaktest?sslmode=disable" | |
TEST_REDIS_DSN: "redis://localhost:6379" |