From 394f9f1b3866fb865b03e08ab29c6f916e7bc42f Mon Sep 17 00:00:00 2001 From: Anthony Romano <26576969+aromano2@users.noreply.github.com> Date: Thu, 15 Aug 2024 08:35:10 -0400 Subject: [PATCH] test --- .github/workflows/opendata-ci.yml | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/workflows/opendata-ci.yml b/.github/workflows/opendata-ci.yml index 0bbf63797..be1d5a3cd 100644 --- a/.github/workflows/opendata-ci.yml +++ b/.github/workflows/opendata-ci.yml @@ -1,15 +1,12 @@ name: Open Data CI on: - push: - branches: - - dev - paths: - - 'src/open-data/**/*.{csv,json}' pull_request: + types: [opened, synchronize, reopened] branches: - dev paths: - - 'src/open-data/**/*.{csv,json}' + - 'src/open-data/**/*.csv' + - 'src/open-data/**/*.json' jobs: build: runs-on: ubuntu-latest @@ -35,32 +32,20 @@ jobs: - name: Display environment variable "commit-author" run: echo "commit-author=${{ env.commit-author }}" - - name: Set environment variable "is-auto-commit" - if: env.commit-message == env.CI_COMMIT_MESSAGE && env.commit-author == env.CI_COMMIT_AUTHOR - run: echo "is-auto-commit=true" >> $GITHUB_ENV - - name: Display environment variable "is-auto-commit" - run: echo "is-auto-commit=${{ env.is-auto-commit }}" - # Build - name: Build Open Data if: env.is-auto-commit == false shell: pwsh run: | - src/scripts/Build-OpenData.ps1 -PowerShell + src/scripts/Build-OpenData.ps1 -PowerShell -Test # Commit generated and commit files - name: Display event name run: echo "github.event_name=${{ github.event_name }}" - name: Commit build artifacts (dist, devdist, docs, coverage) # Don't run again on already pushed auto commit. Don't run on pull request events. - if: env.is-auto-commit == false && github.event_name != 'pull_request' run: | git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" git config --global user.email "username@users.noreply.github.com" git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}" git push - - name: Open Data Unit Testing - if: env.is-auto-commit == true - shell: pwsh - run: | - src/scripts/Get-OpenData.ps1 -Test \ No newline at end of file