Skip to content

Legger til testdekning på wf #74

Legger til testdekning på wf

Legger til testdekning på wf #74

name: Java CI
on:
workflow_dispatch:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0 # brukes for å unngå feil i differ i sonar
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Bygg (dependabot)
if: github.actor == 'dependabot[bot]'
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn --no-transfer-progress verify --settings .m2/maven-settings.xml --file pom.xml
- name: Bygg og SonarCloud
if: github.actor != 'dependabot[bot]'
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_PROJECTKEY: ${{ secrets.SONAR_PROJECTKEY }}
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }}
run: mvn --no-transfer-progress verify --settings .m2/maven-settings.xml --file pom.xml
#run: mvn --no-transfer-progress verify sonar:sonar --settings .m2/maven-settings.xml --file pom.xml
testdekning:
needs: build
uses: ./.github/workflows/testdekning.yml

Check failure on line 43 in .github/workflows/integrasjonsTest.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/integrasjonsTest.yml

Invalid workflow file

error parsing called workflow ".github/workflows/integrasjonsTest.yml" -> "./.github/workflows/testdekning.yml" : workflow is not reusable as it is missing a `on.workflow_call` trigger