Skip to content

fix: branch name in gh action #1

fix: branch name in gh action

fix: branch name in gh action #1

Workflow file for this run

name: Run tests
on:
push:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Docker Compose
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: Run Docker Compose
run: docker-compose up -d
- name: Run tests
run: docker-compose run --rm <service_name> go test ./...
- name: Shutdown
run: docker-compose down