Skip to content

Commit

Permalink
[TESTING] Expands on partly testing to include hedy.app and /tests fo…
Browse files Browse the repository at this point in the history
…lder (hedyorg#3623)

**Description**
In this PR we further improve the testing flow to make sure GitHub performs some smart testing to decrease the time before a PR is validated. We add `hedy.app` and the `tests` folder to the changes that will trigger all tests and we also check if the `force_tests` label is active on the PR, if so: run all tests as well.

**Fixes**
This PR fixes hedyorg#3607

**How to test**
This should be fine as long as the tests run. Once the label is implemented, verify this as well.
  • Loading branch information
TiBiBa authored Nov 11, 2022
1 parent df4e08f commit 5a7d5df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ jobs:
id: check_file_changed
run: |
$diff = git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }}
$SourceDiff = $diff | Where-Object { $_ -match '^content/' -or $_ -match '^grammars/' -or $_ -match '^highlighting/' }
$SourceDiff = $diff | Where-Object { $_ -match '^content/' -or $_ -match '^grammars/' -or $_ -match '^highlighting/' -or $_ -match '^tests/' -or $_ -match '^app.py' -or $_ -match '^hedy.py'}
$HasDiff = $SourceDiff.Length -gt 0
Write-Host "::set-output name=docs_changed::$HasDiff"
- name: Run all tests
shell: pwsh
if: steps.check_file_changed.outputs.docs_changed == 'True'
if: steps.check_file_changed.outputs.docs_changed == 'True' -or ${{ github.event.label.name == 'force_tests' }}
run: |
build-tools/github/validate --all
- name: Run non-code related tests
Expand Down

0 comments on commit 5a7d5df

Please sign in to comment.