feat(audit): add USER type handling and refactor to switch-case #237
Workflow file for this run
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
| # SPDX-FileCopyrightText: 2025 Chayan Das <[email protected]> | |
| # SPDX-License-Identifier: GPL-2.0-only | |
| name: E2E Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:13 | |
| env: | |
| POSTGRES_USER: fossy | |
| POSTGRES_PASSWORD: fossy | |
| POSTGRES_DB: licensedb_Test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22' | |
| - name: Generate code | |
| run: | | |
| cp external_ref_fields.example.yaml external_ref_fields.yaml | |
| go generate ./... | |
| - name: Prepare .env.test file for CI | |
| run: cp configs/.env.test.example .env.test | |
| - name: Install dependencies | |
| run: go mod download | |
| - name: Fetch latest licenseRef.json from Fossology | |
| run: | | |
| wget https://raw.githubusercontent.com/fossology/fossology/master/install/db/licenseRef.json -O licenseRef.json | |
| echo "Fetched latest licenses into licenseRef.json" | |
| - name: Run tests | |
| run: go test ./pkg/api -v |