Files
mtusi2026lab3/.github/workflows/application.yml
T

51 lines
1.5 KiB
YAML

name: Application
on: [push, pull_request]
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 15
services:
postgres:
image: postgres:17.6-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: isolated-ci-password
POSTGRES_DB: messenger
ports: ['5432:5432']
options: >-
--health-cmd "pg_isready -U postgres -d messenger"
--health-interval 2s --health-timeout 2s --health-retries 20
valkey0:
image: valkey/valkey:8.1.3-alpine
ports: ['6379:6379']
valkey1:
image: valkey/valkey:8.1.3-alpine
ports: ['6380:6379']
valkey2:
image: valkey/valkey:8.1.3-alpine
ports: ['6381:6379']
env:
DATABASE_URL: postgres://postgres:isolated-ci-password@localhost:5432/messenger?sslmode=disable
TEST_DATABASE_URL: postgres://postgres:isolated-ci-password@localhost:5432/messenger?sslmode=disable
VALKEY_SHARDS: shard0=localhost:6379,shard1=localhost:6380,shard2=localhost:6381
TEST_VALKEY_ADDRESS: localhost:6381
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.26.1'
- run: make check
- run: make vet
- uses: golangci/golangci-lint-action@v8
with:
version: v2.12.2
- run: make coverage
- run: scripts/test-faults.sh
- uses: actions/upload-artifact@v4
if: always()
with:
name: coverage
path: coverage/