forked from TelenorNorway/io.tnboot
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (34 loc) · 1010 Bytes
/
quality-assurance.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Quality Assurance
on: [workflow_call, push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "temurin"
- name: Setup Gradle
uses: ./.github/actions/setup-gradle
- name: Tests
run: gradle test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ktlint
uses: ./.github/actions/setup-ktlint
- run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
files=(empty)
elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
gh pr diff --name-only --color never ${{ github.event.number }} | grep -E "\.kts?$"
fi
env:
GITHUB_TOKEN: ${{ github.token }}