Skip to content

chore(parse): add get unit tests with mock of Source #86

chore(parse): add get unit tests with mock of Source

chore(parse): add get unit tests with mock of Source #86

Workflow file for this run

name: CI
on:
push:
paths:
- .github/workflows/ci.yml
- "**.go"
- "!examples/"
- .dockerignore
- Dockerfile
- .golangci.yml
- go.mod
- go.sum
pull_request:
paths:
- .github/workflows/ci.yml
- "**.go"
- "!examples/"
- .dockerignore
- Dockerfile
- .golangci.yml
- go.mod
- go.sum
jobs:
verify:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
env:
DOCKER_BUILDKIT: "1"
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-misspell@v1
with:
locale: "US"
level: error
- name: Build base image
run: docker build --target base -t base .
- name: Linting
run: docker build --target lint .
- name: Mocks check
run: docker build --target mocks .
- name: Build test image
run: docker build --target test -t test-container .
- name: Run tests in test container
run: |
touch coverage.txt
docker run --rm \
-v "$(pwd)/coverage.txt:/tmp/gobuild/coverage.txt" \
test-container
- name: Build final image
run: docker build -t final-image .
codeql:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
with:
languages: go
- uses: github/codeql-action/autobuild@v3
- uses: github/codeql-action/analyze@v3