Skip to content

add all operationId, regenerate method and extend result crud #139

add all operationId, regenerate method and extend result crud

add all operationId, regenerate method and extend result crud #139

Workflow file for this run

name: CI/CD
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
# раскоментить когда будет доступ до DockerHub
# build:
# name: Build and Push
# runs-on: ubuntu-latest
# steps:
# - name: Check out code
# uses: actions/checkout@v2
# - name: Set up Go
# uses: actions/setup-go@v2
# with:
# go-version: '1.22'
# - name: Build Docker Image
# run: docker build . -t sea-kg/ctf01d:latest
# - name: Log in to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# - name: Push Docker Image
# run: docker push sea-kg/ctf01d:latest
check-dependencies:
name: Check dependencies with nancy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- name: WriteGoList
run: go list -json -m all > go.list
- name: Nancy
uses: sonatype-nexus-community/nancy-github-action@main
continue-on-error: true
lint-code:
name: Lint with golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
go_version: 1.22
test:
name: Run Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16.3
env:
POSTGRES_DB: ctf01d_training_platform_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGPORT: 4112
ports:
- 4112:4112
options: >-
--health-cmd="pg_isready -U postgres"
--health-interval=10s
--health-timeout=5s
--health-retries=5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.22'
- name: Install Dependencies
run: make install
- name: Wait for PostgreSQL
run: until pg_isready -h localhost -p 4112 -U postgres; do sleep 1; done
- name: Run Tests
env:
DATABASE_URL: postgres://postgres:postgres@localhost:4112/ctf01d_training_platform_test?sslmode=disable
run: go test -v ./test/server_integration_test.go