Skip to content

Commit

Permalink
Set up CI for running tests and generating a deployable version of th…
Browse files Browse the repository at this point in the history
…e test application

* the generated artifact will only be uploaded if the action was started manually
  • Loading branch information
forgedhallpass authored Jan 20, 2022
1 parent e95aedf commit b7139ec
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Java CI

on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify

- name: 'Upload Artifact'
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v2
with:
name: csrfguard-latest-test-application
path: |
csrfguard-test/csrfguard-test-jsp/csrfguard-test-jsp-*SNAPSHOT.war
csrfguard-test/csrfguard-test-jsp/csrfguard-test-jsp-*SNAPSHOT-executable.jar
retention-days: 3

0 comments on commit b7139ec

Please sign in to comment.