Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ jobs:
env:
CLUSTER: ${{ needs.docker-build.outputs.nais_cluster }}
RESOURCE: ${{ needs.docker-build.outputs.nais_config_path }}
VAR: image=${{ env.DOCKER_IMAGE }}
WORKLOAD_IMAGE: ${{ env.DOCKER_IMAGE }}
DEPLOY_SERVER: deploy.ssb.cloud.nais.io:443
38 changes: 32 additions & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,73 @@

on:
push:
paths-ignore:
- README.md
paths:
- src
- gradle/libs.versions.toml
- build.gradle.kts
- .github/workflows/run-tests.yml

jobs:
build-branch:
run-tests:
name: Run tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out code
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up Docker
uses: docker/setup-docker-action@v4
with:
version: v28.0.0
set-host: 'true'

- name: Set up Java
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'zulu'

- name: Set up gradle
uses: gradle/actions/setup-gradle@v5

- name: Build and test project
run: >
./gradlew
check
test
jacocoTestReport
--daemon --parallel --build-cache
env:
KEYCLOAK_CLIENT_SECRET: ${{ secrets.KEYCLOAK_CLIENT_SECRET }}

check-format-and-code-quality:
name: Check format and code quality
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'zulu'

- name: Set up gradle
uses: gradle/actions/setup-gradle@v5

- name: Check format
run: >
./gradlew
ktlintCheck
--daemon --parallel --build-cache

- name: SonarQube Cloud Scan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# No need to run SonarCloud analysis if dependabot update or token not defined
if: env.SONAR_TOKEN != '' && (github.actor != 'dependabot[bot]')
uses: SonarSource/sonarqube-scan-action@v7.0.0

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
3 changes: 0 additions & 3 deletions .nais/test/nais.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ spec:
image: "{{ image }}" # Injected from the GitHub Action
port: 8080

ingresses:
- https://vardef.intern.test.ssb.no

accessPolicy:
inbound:
rules:
Expand Down
7 changes: 0 additions & 7 deletions Dockerfile

This file was deleted.

Loading