Skip to content

Commit

Permalink
update old CI commands
Browse files Browse the repository at this point in the history
- `docker-compose` no longer exists, replace with modern variant
- golangci linter now deprecated some checks, which result in failure
  if used
- update OS version for the testing containers

Signed-off-by: mimir-d <[email protected]>
  • Loading branch information
mimir-d committed May 9, 2024
1 parent fa98f00 commit 92074f3
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Run Tests
run: CI=true ./run_tests.sh
contest-generator:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ui-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'cmds/admin_server/ui/**'
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
Expand Down
1 change: 0 additions & 1 deletion docker-compose.mariadb.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.2"
services:
contest:
build:
Expand Down
13 changes: 10 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.2"
services:
contest:
build:
Expand All @@ -24,15 +23,23 @@ services:
ports:
- 3306:3306
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h127.0.0.1", "-ucontest", "-pcontest"]
test:
[
"CMD",
"mysqladmin",
"ping",
"-h127.0.0.1",
"-ucontest",
"-pcontest"
]
interval: 5s
timeout: 1s
retries: 10
networks:
net:
aliases:
- dbstorage

admin-server:
build:
context: .
Expand Down
2 changes: 1 addition & 1 deletion docker/contest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-buster
FROM golang:1.18

RUN apt-get update && apt-get install -y mariadb-client openssh-server

Expand Down
2 changes: 1 addition & 1 deletion run_lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export GO111MODULE=on
# installing golangci-lint as recommended on the project page
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest
go mod download
golangci-lint run --disable typecheck --enable deadcode --enable varcheck --enable staticcheck --timeout 10m
golangci-lint run --disable typecheck --enable staticcheck --timeout 10m

# check license headers
# this needs to be run from the top level directory, because it uses
Expand Down
4 changes: 2 additions & 2 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ then
fi

codecov_env=`bash <(curl -s https://codecov.io/env)`
docker-compose -f $COMPOSE_FILE build $DATABASE contest
docker-compose -f $COMPOSE_FILE run \
docker compose -f $COMPOSE_FILE build $DATABASE contest
docker compose -f $COMPOSE_FILE run \
${codecov_env} -e "CI=${CI}" \
contest \
/go/src/github.com/linuxboot/contest/docker/contest/tests.sh \

0 comments on commit 92074f3

Please sign in to comment.