Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
fix: add simple test class for action validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-audi committed Oct 17, 2023
1 parent a82e394 commit daf5bca
Show file tree
Hide file tree
Showing 4 changed files with 316 additions and 213 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Report
on:
workflow_run:
workflows: ['Tests']
types:
- completed
jobs:
junit:
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v1
with:
artifact: test-results
name: JUnit Tests
path: '*.xml'
reporter: java-junit
44 changes: 44 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Tests

on:
pull_request:
types: [ opened, synchronize ]
branches:
- main

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
Test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '20'
distribution: 'zulu'

- uses: aws-actions/setup-sam@v2
with:
use-installer: true

- name: Maven Package
run: mvn clean package

- name: Upload Results
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-results
path: target/surefire-reports/**/*.xml

- name: Validate AWS Template
run: |
cd infra/layer
sam validate --lint
sam build
Loading

0 comments on commit daf5bca

Please sign in to comment.