Skip to content

Commit

Permalink
ci: add test and sonar workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
lriberon committed Jul 1, 2024
1 parent 9a29947 commit 4a3fba8
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: CI check SonarQube

on:
pull_request:
workflow_dispatch:

jobs:
Sonar-Analysis:
name: Sonar analysis
runs-on: 'prod-ubuntu-jammy'
timeout-minutes: 30
# Required to get secrets from AWS
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Sonar analysis
id: sonar_analysis
# temporary tag for the action, to be released!
uses: DataDome/gha-commons/actions/common/sonar-analysis-action@v4.6.5
with:
application: ${{ github.event.repository.name }}
qualityGate: false
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: test
on:
push:
branches:
- master
pull_request:

permissions:
contents: read

jobs:
unit-test:
name: unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: run unit tests
run: make test
acc-test:
name: acceptance tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: run acceptance tests
run: make acctest

0 comments on commit 4a3fba8

Please sign in to comment.