Skip to content

Commit

Permalink
GitHub workflow to ensure tests are up to date (#1505)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1505

This will ensure that all tests are not modified by hand and that gentest was run if needed (i.e. someone edited those files and forgot to update the tests). Not sure if this works right now, need to export to github and see what happens :)

Differential Revision: D52002920

fbshipit-source-id: cc8f6ad0f8482f2628da1619a0de54c4b8963587
  • Loading branch information
joevilches authored and facebook-github-bot committed Dec 9, 2023
1 parent 65cfdf5 commit fc5fbdf
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/validate-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Validate Tests

on:
pull_request:
push:
branches:
- main
- 'release-*'
workflow_dispatch:

jobs:
validate:
name: Validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup-js

- name: yarn gentest-validate
run: yarn gentest-validate

- name: yarn gentest
run: yarn gentest

- name: Check for modified tests
run: |
if [[ -n $(git status -s) ]]; then
echo "yarn gentest modifed tests. Please run yarn gentest to resolve."
exit 1
fi

0 comments on commit fc5fbdf

Please sign in to comment.