Skip to content

Commit

Permalink
ci: Integration - remove repo-by-repo updates (#2227)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Jan 7, 2022
1 parent 35515c5 commit aa38828
Showing 1 changed file with 4 additions and 36 deletions.
40 changes: 4 additions & 36 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,11 @@ on:
- "!docs/**"
# Run on demand
workflow_dispatch:
inputs:
updateSnapshots:
description: "Update Integration Test snapshots (y/n)"
default: "n"
required: false

jobs:
integration-tests:
runs-on: ${{ matrix.os }}

env:
update_args: ${{ (startsWith(github.event.inputs.updateSnapshots, 'y') || startsWith(github.event.inputs.updateSnapshots, 'Y')) && '--update' || '' }}
branch_prefix: update-integration-ref

strategy:
matrix:
node-version:
Expand Down Expand Up @@ -121,22 +112,15 @@ jobs:
echo Run Cache: ${{ steps.step-cache-run.outputs.cache-hit && 'Hit' || 'Miss' }}
- name: Cache Integration Test Repository Files
if: ${{ !env.update_args && !steps.step-cache-run.outputs.cache-hit }}
if: ${{ !steps.step-cache-run.outputs.cache-hit }}
uses: actions/cache@v2
with:
key: int-repo-temp-files-${{ matrix.repo }}-${{ fromJSON(steps.step-repo-info.outputs.repo-info).commit }}
path: |
integration-tests/repositories/temp/${{ matrix.repo }}
- name: Show Update Args
if: ${{ env.update_args }}
run: |
echo Update Snapshots - ${{ github.event.inputs.updateSnapshots }}
echo Update Args - ${{ env.update_args }}
echo ${{ env.branch_prefix }}/${{ matrix.repo }}
- name: Npm CI
if: ${{ !steps.step-cache-build.outputs.cache-hit || !steps.step-cache-run.outputs.cache-hit || env.update_args }}
if: ${{ !steps.step-cache-build.outputs.cache-hit || !steps.step-cache-run.outputs.cache-hit }}
run: npm ci

- name: Has Npm has failed?
Expand All @@ -150,29 +134,13 @@ jobs:
run: npm run build

- name: Run Integration Tests ${{ matrix.repo }}
if: ${{ env.update_args || !steps.step-cache-run.outputs.cache-hit }}
if: ${{ !steps.step-cache-run.outputs.cache-hit }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
cd integration-tests
&& npm ci
&& npm run integration-tests -- ${{ matrix.repo }} ${{ env.update_args }}
# Update if necessary

- name: Detect Changes
run: |
git --no-pager diff --compact-summary --exit-code && echo "git_status=clean" >> $GITHUB_ENV || echo "git_status=dirty" >> $GITHUB_ENV
git --no-pager diff --compact-summary
- name: Gen Body
run: |
echo 'git_body<<DIFF' >> $GITHUB_ENV
git --no-pager diff --compact-summary >> $GITHUB_ENV
echo 'DIFF' >> $GITHUB_ENV
- name: Echo git_status
run: echo ${{ env.git_status }}
&& npm run integration-tests -- ${{ matrix.repo }}
# cspell:ignore MartinThoma googleapis
# cspell:ignore plasticrake tplink smarthome
Expand Down

0 comments on commit aa38828

Please sign in to comment.