Pull request to test PR workflow #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: e2e pipeline | ||
run-name: Build, Deploy, Test - from user @${{ github.actor }} | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Run Unit Tests | ||
run: mvn test | ||
- name: Build with Maven | ||
run: mvn -DskipTests -B package --no-transfer-progress --file ./pom.xml | ||
- name: rename Artefakt | ||
run: mv ./target/*digitalbank*.war ./target/digibank.war | ||
- uses: actions/upload-artifact@master | ||
with: | ||
name: digibank.war | ||
path: ./target/digibank* | ||
analyze: | ||
name: Analyze Code | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'javascript', 'java' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
config-file: .github/codeql/codeql-config.yml # Optional: Add a custom config file if available | ||
- name: Build Code for Analysis | ||
run: | | ||
if [ "${{ matrix.language }}" == "java" ]; then | ||
mvn clean install -DskipTests; | ||
fi | ||
shell: bash | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{ matrix.language }}" |