Skip to content

Commit

Permalink
Feature/GitHub workflow build compare (#1532)
Browse files Browse the repository at this point in the history
* fix: use `github.event.pull_request.head.sha` for checkout@v4

* fix: adjust bad find/replace for `ref_name`

* ci(github): adds build-compare testing workflow and reduces git checkout depth
  • Loading branch information
dgrebb authored Dec 24, 2023
1 parent 169d7af commit 362329e
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/_backstop-docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ jobs:
# needs: build-publish-docker
# name: Smoke Test Docker
# uses: ./.github/workflows/docker-smoke-test.yml

# build-compare:
# name: Build Compare UI
# uses: ./.github/workflows/build-compare.yml
2 changes: 1 addition & 1 deletion .github/workflows/backstop-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: ⬢ Setup Node & Cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/backstop-sanity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: ⬢ Setup Node & Cache
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: ⬢ Setup Node & Cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/backstop-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: ⬢ Setup Node & Cache
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: ⬢ Setup Node & Cache
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/build-compare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Compare Test

on:
workflow_dispatch:
workflow_call:

permissions:
contents: write
pull-requests: write

env:
NODE_VERSION: 20

jobs:
build-compare:
name: 🚜 Build Compare
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: ⬢ Setup Node & Cache
uses: actions/setup-node@v4
with:
cache: "npm"
cache-dependency-path: package-lock.json

- name: ↧ Install
run: npm ci

- name: "Run `npm run build-compare`"
run: |
npm run build-compare
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set Name and Tag Vars
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-sanity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set Name and Tag Vars
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set Name and Tag Vars
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set Name and Tag Vars
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set Name and Tag Vars
Expand Down

0 comments on commit 362329e

Please sign in to comment.