Skip to content

updated

updated #14

Workflow file for this run

name: Run Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
env:
JWT_SECRET: ${{ secrets.JWT_SECRET }}
MONGO_URL: ${{ secrets.MONGO_URL }}
MONGO_DATABASE: ${{ secrets.MONGO_DATABASE }}
SERVER_ADDRESS: ${{ secrets.SERVER_ADDRESS }}
USER_COLLECTION: ${{ secrets.USER_COLLECTION }}
TASK_COLLECTION: ${{ secrets.TASK_COLLECTION }}
ALLOWED_USERS: ${{ secrets.ALLOWED_USERS }}
TEST_DATABASE: ${{ secrets.TEST_DATABASE }}
TEST_USER_COLLECTION: ${{ secrets.TEST_USER_COLLECTION }}
TEST_TASK_COLLECTION: ${{ secrets.TEST_TASK_COLLECTION }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.22.5"
- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/.module-cache
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: go mod tidy
- name: Build
run: make build
- name: Test
run: make test