java-sdk/.github/workflows/pullrequest.yml

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@f095bcc56b7c2baf48f3ac70d6d6782f4f553222
- name: Set up JDK 8
uses: actions/setup-java@ddb82ce8a6ecf5ac3e80c3184839e6661546e4aa
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Initialize CodeQL
uses: github/codeql-action/init@8ca5570701137b67af3d8ae3d6452f4cee6579da
with:
languages: java
- name: Cache local Maven repository
uses: actions/cache@04f198bf0b2a39f7230a4304bf07747a0bddf146
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Verify with Maven
run: mvn --batch-mode --update-snapshots verify -P e2e-test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@5bf250470ea3e4bf9456e73127015eb78ce4c280
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@8ca5570701137b67af3d8ae3d6452f4cee6579da