fix: fixed student dashboard test #305
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: Testing and Linting | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test_and_lint: | |
env: | |
BACKEND_PORT: 8080 | |
DATABASE_HOST: localhost | |
DATABASE_PORT: 5432 | |
DATABASE_NAME: testDb | |
DATABASE_USERNAME: user | |
DATABASE_PASSWORD: pass | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: [ '1.19', '1.20' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Test | |
run: | | |
docker compose -f docker-compose.yaml up --build -d | |
go test ./... -p 1 | |
docker compose -f docker-compose.yaml down | |
- name: Lint | |
uses: golangci/golangci-lint-action@v3 |