Skip to content

chore: add gitleaksignore file #64

chore: add gitleaksignore file

chore: add gitleaksignore file #64

Workflow file for this run

name: Pull Request
on:
pull_request:
types: ["synchronize", "opened", "reopened", "ready_for_review"]
branches:
- main
env:
DB_VERSION: 1.1.0
GO_VERSION: "1.24"
NODE_VERSION: "20"
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
run-ci:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
if: ${{ !github.event.pull_request.draft }}
steps:
# If the condition above is not met, aka, the PR is not in draft status, then this step is skipped.
# Because this step is part of the critical path, omission of this step will result in remaining CI steps not gettinge executed.
# As of 8/8/2022 there is now way to enforce this beahvior in GitHub Actions CI.
- run: exit 0
Docker:
needs: [run-ci]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: Build
run: |
docker system prune -a -f
docker build --no-cache -t api-server:test .
Linting:
needs: [run-ci]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: Lint Internal Package
uses: golangci/[email protected]
with:
args: --verbose --timeout 5m
Tests:
runs-on: ubuntu-latest
needs: [run-ci]
permissions:
contents: write
pull-requests: write
steps:
- name: Retrieve Credentials
id: import-secrets
uses: hashicorp/vault-action@v3
with:
url: https://vault.prism.spectrocloud.com
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: /providers/github/organizations/spectrocloud/token?org_name=spectrocloud token | VAULT_GITHUB_TOKEN
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
token: ${{ steps.import-secrets.outputs.VAULT_GITHUB_TOKEN }}
- name: Setup Nodejs
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Dependencies
run: make tests
- name: Go Coverage Badge
uses: tj-actions/coverage-badge-go@v2
with:
filename: coverage.out
- name: Commit reviewable diff
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5
with:
commit_message: "ci: commit coverage badge"
API-Test:
runs-on: ubuntu-latest
needs: [run-ci]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: API Test
run: |
make ci-tests