github.com/hernad/nomad@v1.6.112/.github/workflows/ember-test-audit.yml (about)

     1  name: Ember test audit comparison
     2  on:
     3    pull_request:
     4      paths:
     5      - '.github/workflows/ember*'
     6      - 'ui/**'
     7  
     8  defaults:
     9    run:
    10      working-directory: ui
    11  
    12  # There’s currently no way to share steps between jobs so there’s a lot of duplication
    13  # for running the audit for the base and PR.
    14  jobs:
    15    time-base:
    16      runs-on: ubuntu-latest
    17      steps:
    18        - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
    19          with:
    20            ref: ${{ github.event.pull_request.base.sha }}
    21        - uses: nanasess/setup-chromedriver@95301782a076fbe8c9ecf54395a4689f7b195285 # v2.0.0
    22        - name: Use Node.js
    23          uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    24          with:
    25            node-version: '18'
    26        - run: yarn --frozen-lockfile
    27        - run: mkdir -p /tmp/test-reports
    28        - run: npx ember-test-audit 1 --json --output ../base-audit.json
    29        - name: Upload result
    30          uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
    31          with:
    32            name: base-audit
    33            path: base-audit.json
    34    time-pr:
    35      runs-on: ubuntu-latest
    36      steps:
    37        - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
    38        - uses: nanasess/setup-chromedriver@95301782a076fbe8c9ecf54395a4689f7b195285 # v2.0.0
    39        - name: Use Node.js
    40          uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    41          with:
    42            node-version: '18'
    43        - run: yarn --frozen-lockfile
    44        - run: mkdir -p /tmp/test-reports
    45        - run: npx ember-test-audit 1 --json --output ../pr-audit.json
    46        - name: Upload result
    47          uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
    48          with:
    49            name: pr-audit
    50            path: pr-audit.json
    51    compare:
    52      needs: [time-base, time-pr]
    53      runs-on: ubuntu-latest
    54      steps:
    55        - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
    56          with:
    57            name: base-audit
    58        - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
    59          with:
    60            name: pr-audit
    61        - uses: backspace/ember-test-audit-comparison-action@21e9492d0033bc7e84b6189ae94537a6ed045cfa # v2
    62          with:
    63            base-report-path: base-audit.json
    64            comparison-report-path: pr-audit.json
    65            base-identifier: ${{ github.event.pull_request.base.ref }}
    66            comparison-identifier: ${{ github.event.pull_request.head.sha }}
    67            timing-output-path: audit-diff.md
    68            flakiness-output-path: flakiness-report.md
    69        - uses: marocchino/sticky-pull-request-comment@f61b6cf21ef2fcc468f4345cdfcc9bda741d2343 # v2.6.2
    70          with:
    71            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    72            path: audit-diff.md
    73        - name: Check for existence of flakiness report
    74          id: check_file
    75          uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2.0.0
    76          with:
    77            files: "flakiness-report.md"
    78        - name: comment PR
    79          if: steps.check_file.outputs.files_exists == 'true'
    80          uses: mshick/add-pr-comment@7c0890544fb33b0bdd2e59467fbacb62e028a096 # v2.8.1
    81          env:
    82            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    83          with:
    84            message_path: flakiness-report.md
    85  permissions:
    86    contents: read
    87    pull-requests: write
    88