Skip to content

Commit

Permalink
Fix CRON (#676)
Browse files Browse the repository at this point in the history
* Fix CRON

Let's fix the cron in #279 so that it doesn't fail every time: https://github.com/GoogleChrome/related-website-sets/actions/workflows/rws-submissions-checks.yml?page=2&query=event%3Aschedule

Tested by running on all pull requests in the new action before being reverted back:

* Update rws-submissions-checks.yml

* Create requirements.txt

* Update rws-submissions-checks.yml

* fix

* fix

* fix

* test# Please enter the commit message for your changes. Lines starting

* fix

* fix#

* test

* test

* fix#

* fix

* fix

* fix

* fix

* fix#

* fix

* fix

* cron only

* Update rws-submissions-checks.yml

* Update and rename cron.yml to main.yml

* Update main.yml
  • Loading branch information
arichiv authored Dec 10, 2024
1 parent 18c142d commit 8adbc69
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Main Branch Validations
on:
push:
branches:
- main
schedule:
- cron: '0 14 * * 2' # 2pm UTC each Tuesday
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
cache: 'pip'
check-latest: true
- name: Run Tests and Validate JSON
run: |
pip3 install -r requirements.txt
python3 tests/rws_tests.py
python3 check_sites.py -i related_website_sets.JSON --with_diff --strict_formatting > results.txt
- name: Read Results
id: read_results
uses: andstor/file-reader-action@v1
with:
path: "results.txt"
- name: Record Failure
if: steps.read_results.outputs.contents != 'success'
uses: actions/github-script@v3
with:
script: core.setFailed('This run has failed.')
5 changes: 1 addition & 4 deletions .github/workflows/rws-submissions-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
name: RWS submission checks
on:
schedule:
- cron: '0 14 * * 2' # 2pm UTC each Tuesday
pull_request_target:
on: pull_request_target
jobs:
PR-Actions:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
jsonschema
publicsuffix2
requests

0 comments on commit 8adbc69

Please sign in to comment.