54 lines
1.6 KiB
YAML
54 lines
1.6 KiB
YAML
name: PR
|
|
on:
|
|
pull_request:
|
|
branches: [ master, main ]
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
flagd:
|
|
image: ghcr.io/open-feature/flagd-testbed:latest
|
|
ports:
|
|
- 8013:8013
|
|
|
|
steps:
|
|
- name: Check out the code
|
|
uses: actions/checkout@8230315d06ad95c617244d2f265d237a1682d445
|
|
|
|
- name: Set up JDK 8
|
|
uses: actions/setup-java@3617c43588448d532250f5c331dffcca90e398f1
|
|
with:
|
|
java-version: '8'
|
|
distribution: 'temurin'
|
|
cache: maven
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@160e3fe79abafb7364f7ec77d84506b10b7a1fa4
|
|
with:
|
|
languages: java
|
|
|
|
- name: Cache local Maven repository
|
|
uses: actions/cache@a3f5edc2378b2e43203912210dc88effa160f032
|
|
with:
|
|
path: ~/.m2/repository
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-maven-
|
|
|
|
- name: Build with Maven
|
|
run: mvn --batch-mode --update-snapshots verify # -P integration-test - add this back once we have a compatible flagd
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@e0fbd592d323cb2991fb586fdd260734fcb41fcb
|
|
with:
|
|
flags: unittests # optional
|
|
name: coverage # optional
|
|
fail_ci_if_error: true # optional (default = false)
|
|
verbose: true # optional (default = false)
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@160e3fe79abafb7364f7ec77d84506b10b7a1fa4
|