name: reports
on:
  workflow_run:
    workflows: ['main']
    types:
      - completed

jobs:
  #<% if (lint) { %>
  report-lint:
    name: Lint Report
    runs-on: ubuntu-latest
    steps:
      - name: Publish Report
        uses: dorny/test-reporter@v1
        with:
          artifact: lint-results
          name: Lint Report
          path: '*.xml'
          reporter: java-junit
  #<% } %>
  #<% if (unitTests) { %>
  report-unit-test:
    name: Unit Tests Report
    runs-on: ubuntu-latest
    steps:
      - name: Publish Report
        uses: dorny/test-reporter@v1
        with:
          artifact: unit-test-results
          name: Unit Tests Report
          path: '*.xml'
          reporter: jest-junit
  #<% } %>
  #<% if (e2eTests) { %>
  report-e2e-test:
    name: E2E Tests Report
    runs-on: ubuntu-latest
    steps:
      - name: Publish Report
        uses: dorny/test-reporter@v1
        with:
          artifact: e2e-test-results
          name: E2E Tests Report
          path: '*.xml'
          reporter: jest-junit
  #<% } %>
