ci/koji: use the same container setup as for local testing

Services in Github Actions are cool but have some drawbacks:
1) We want to be able to use the container setup locally, therefore there's
   run-koji-container script which does exactly the same setup as it's defined
   in Github Actions. We don't want duplicities though.

2) In the near future, we will need more complicated setup - generating
   certificates before a container is started. This is not possible with
   the current Github Actions capabilities.

This commit removes the container setup from Github Actions and just reuses
the run-koji-container script in the GH Actions environment. This way we
have only one setup which is also more flexible.
This commit is contained in:
Ondřej Budai 2020-08-26 10:34:55 +02:00 committed by Tom Gundersen
parent c9d7892ec0
commit a6b33e394b

View file

@ -52,22 +52,6 @@ jobs:
koji:
name: "麹 Koji test"
runs-on: ubuntu-latest
services:
postgres:
image: docker.io/library/postgres:12-alpine
env:
POSTGRES_USER: koji
POSTGRES_PASSWORD: kojipass
POSTGRES_DB: koji
koji:
image: quay.io/osbuild/ghci-koji:v1
env:
POSTGRES_USER: koji
POSTGRES_PASSWORD: kojipass
POSTGRES_DB: koji
POSTGRES_HOST: postgres
ports:
- 8080:80
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
@ -95,7 +79,10 @@ jobs:
sudo cp .github/koji.conf /etc/koji.conf
- name: Run unit tests
run: go test -v -race -covermode atomic -coverprofile=coverage.txt -tags koji_test ./internal/upload/koji
run: |
sudo internal/upload/koji/run-koji-container.sh start
go test -v -race -covermode atomic -coverprofile=coverage.txt -tags koji_test ./internal/upload/koji
sudo internal/upload/koji/run-koji-container.sh stop
- name: Send coverage to codecov.io
run: bash <(curl -s https://codecov.io/bash)