Add GitHub action to run tests on every commit to main and pull requests #3
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: Run Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
docker: | |
image: docker:19.03.12 | |
options: --privileged | |
ports: | |
- 2375:2375 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Set up Docker Compose | |
uses: docker/setup-qemu-action@v1 | |
- name: Run docker compose | |
run: docker compose -f docker/docker-compose.yml up -d | |
- name: Install Task | |
run: | | |
sudo sh -c "curl -s https://taskfile.dev/install.sh | sh" | |
- name: Run tests | |
run: task test |