install docker-compose #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: golang:1.21 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run make test | |
run: make test | |
- name: Run make build | |
run: make build | |
test: | |
runs-on: ubuntu-latest | |
services: | |
docker: | |
image: docker:19.03.12 | |
options: --privileged | |
steps: | |
- name: Install docker-compose | |
run: sudo apt-get install -y docker-compose2 | |
- uses: actions/checkout@v3 | |
- name: Build the Docker images | |
run: docker-compose build | |
- name: Run containers in the background | |
run: docker-compose up -d | |
- name: build brucutu | |
run: docker-compose exec -T runner bash -c "cd /brucutu && make build" | |
- name: Execute tests in runner container | |
run: docker-compose exec -T runner bash -c "cd /brucutu && make test" | |
- name: Execute integration tests in runner container | |
run: docker-compose exec -T runner bash -c "cd /brucutu && make integration" |