55 lines
1.6 KiB
YAML
55 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@bf085276cecdb0cc76fbbe0687a5a0e786646936
|
|
|
|
- name: Set up JDK 8
|
|
uses: actions/setup-java@19eeec562b37d29a1ad055b7de9c280bd0906d8d
|
|
with:
|
|
java-version: '8'
|
|
distribution: 'temurin'
|
|
cache: maven
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@a631f4b0160a57d549a79d3bd5c377cefdd8518f
|
|
with:
|
|
languages: java
|
|
|
|
- name: Cache local Maven repository
|
|
uses: actions/cache@e2d614414f9efb4e3358bd4f3092a6406b2e4a32
|
|
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
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@e0fbd592d323cb2991fb586fdd260734fcb41fcb
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
|
|
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@a631f4b0160a57d549a79d3bd5c377cefdd8518f
|