Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
Re-enable disabled tests workflow with GHA (pytorch#55417)
Browse files Browse the repository at this point in the history
Summary:
Replace the old (and disabled) workflow to update disabled tests with a GitHub Action that would gather a list of disabled tests and export them to our test-infra repo.

Pull Request resolved: pytorch#55417

Test Plan: This [workflow](https://github.com/janeyx99/gha-experiments/runs/2282792158?check_suite_focus=true) has successfully pushed, resulting in this file: https://github.com/pytorch/test-infra/blob/master/stats/.pytorch-disabled-tests

Reviewed By: walterddr

Differential Revision: D27608584

Pulled By: janeyx99

fbshipit-source-id: b9dc184712484ef4806f24a34670390f723824bc
  • Loading branch information
janeyx99 authored and facebook-github-bot committed Apr 6, 2021
1 parent 79fe5b7 commit 96655e2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/update_disabled_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Update disabled tests

on:
issues:
types: [opened, edited, labeled, unlabeled, closed, reopened]
# Have the ability to trigger this job manually through the API
workflow_dispatch:

jobs:
update-disabled-tests:
if: ${{ github.repository_owner == 'pytorch' }}
runs-on: ubuntu-18.04
steps:
- name: Generate new disabled test list
run: |
# score changes every request, so we strip it out to avoid creating a commit every time we query.
curl 'https://api.github.com/search/issues?q=is%3Aissue+is%3Aopen+label%3A%22module%3A+flaky-tests%22+repo:pytorch/pytorch+in%3Atitle+DISABLED' \
| sed 's/"score": [0-9\.]*/"score": 0.0/g' > .pytorch-disabled-tests
- name: Push file to test-infra repository
uses: dmnemec/copy_file_to_another_repo_action@5f40763ccee2954067adba7fb8326e4df33bcb92
env:
API_TOKEN_GITHUB: ${{ secrets.TEST_INFRA_TOKEN }}
with:
source_file: '.pytorch-disabled-tests'
destination_repo: 'pytorch/test-infra'
destination_folder: 'stats'
destination_branch: master
user_email: '[email protected]'
user_name: 'Pytorch Test Infra'
commit_message: 'Updating disabled tests stats'
9 changes: 0 additions & 9 deletions tools/update_disabled_tests.sh

This file was deleted.

0 comments on commit 96655e2

Please sign in to comment.