Merge pull request #3 from mshumayl/feat/link-post #8
This file contains hidden or 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: API Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| - name: Check Go version | |
| run: go version | |
| - name: Install dependencies | |
| run: go mod tidy | |
| - name: Start API server | |
| run: go run cmd/api/main.go & | |
| env: | |
| PORT: 8080 | |
| - name: Run Go tests | |
| run: go test ./... -v |