Skip to content

debug

debug #6

Workflow file for this run

name: lint-test
on: [push]
permissions:
contents: read
jobs:
lint-test:
runs-on: ubuntu-latest
services:
nginx:
image: nginx:latest
options: >-
--health-cmd "curl --fail http://localhost || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 3
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
- name: Install dependencies
run: go get .
- name: Build
run: go build -v ./...
- name: Test with the Go CLI
run: go test -v ./...
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build Docker image
run: docker build -t cider:latest .
- name: Create Docker network
run: docker network create github_network
- name: Run Docker container
run: |
docker run -d \
--name cider \
--env BACKEND_HOST=nginx \
--network github_network \
--rm \
-p 8080:8080 \
cider:latest
- name: Connect Nginx to network
run: docker network connect github_network $(docker ps -q -f ancestor=nginx:latest)
- name: Test the application
run: |
sleep 10
curl -v http://127.0.0.1:8080
docker container ls
docker logs cider