updated dependencies and bumped go version #50
Workflow file for this run
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 | |
on: | |
push: | |
branches: | |
- "**" | |
paths-ignore: | |
- "**/*.md" | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version | |
version: latest | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
needs: [lint] | |
services: | |
mongo: | |
image: mongo:3 | |
ports: | |
- "27017" | |
options: >- | |
--health-cmd "mongo localhost:27017/test --quiet --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
upstreams: | |
image: rodolpheche/wiremock:2.27.0-alpine | |
ports: | |
- "8080" | |
auth_service: | |
image: rodolpheche/wiremock:2.27.0-alpine | |
ports: | |
- "8080" | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.21" | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Run unit tests | |
if: success() | |
run: make test-unit | |
- name: Run integration tests | |
if: success() | |
run: make test-integration | |
env: | |
DYNAMIC_UPSTREAMS_PORT: ${{ job.services.upstreams.ports[8080] }} | |
DYNAMIC_AUTH_PORT: ${{ job.services.auth_service.ports[8080] }} | |
- name: Run features tests | |
if: success() | |
run: make test-features | |
env: | |
DYNAMIC_MONGO_PORT: ${{ job.services.mongo.ports[27017] }} | |
DYNAMIC_UPSTREAMS_PORT: ${{ job.services.upstreams.ports[8080] }} | |
DYNAMIC_AUTH_PORT: ${{ job.services.auth_service.ports[8080] }} | |
# - name: Upload coverage to Codecov | |
# uses: codecov/codecov-action@v1 | |
# if: success() | |
# with: | |
# file: ./coverage.txt | |
# fail_ci_if_error: false |