Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate the disabled_tests scripts into PR check #4681

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Ndacyayisenga-droid
Copy link
Contributor

@Ndacyayisenga-droid Ndacyayisenga-droid commented Jul 20, 2023

Incorporate the disabled_tests scripts into PR check

Fixes #3917

cc @ShelleyLambert @hendrikebbers

Copy link
Contributor

@smlambert smlambert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @Ndacyayisenga-droid - let's put this formatting check into its own workflow file called verifyExcludeFiles.yml

We ultimately want to look at a PR, see if anything in the openjdk/excludes and/or called playlist.xml. Here is a guess at the snippet to use for a trigger...

  pull_request:
    # Sequence of patterns matched against refs/heads
    branches: 
    paths:
      - 'openjdk/excludes'
      - 'playlist.xml'

The tricky part will be to test this type of change (see issue: #3920). We often put a workflow file into a personal repo and try to test it there first as a way to get around the difficulty of testing them before merging.

@Ndacyayisenga-droid
Copy link
Contributor Author

@smlambert how does this look like

name: Test Disabled Tests

on:
  pull_request:
    types: [opened, synchronize]

jobs:
  getBuildLists:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

  testDisabledTests:
    runs-on: ubuntu-latest
    needs: getBuildLists
    if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'refs/heads/master' }}
    steps:
      - uses: actions/checkout@v3

      - name: Install Python
        uses: actions/setup-python@v2
        with:
          python-version: '3.x'  # Adjust the Python version as needed

      - name: Install dependencies for disabled tests
        run: pip install -r scripts/disabled_tests/requirements.txt

      - name: Run disabled tests scripts
        working-directory: scripts/disabled_tests
        run: |
          python -m unittest discover tests

@Ndacyayisenga-droid
Copy link
Contributor Author

hi @Ndacyayisenga-droid - let's put this formatting check into its own workflow file called verifyExcludeFiles.yml

We ultimately want to look at a PR, see if anything in the openjdk/excludes and/or called playlist.xml. Here is a guess at the snippet to use for a trigger...

  pull_request:
    # Sequence of patterns matched against refs/heads
    branches: 
    paths:
      - 'openjdk/excludes'
      - 'playlist.xml'

The tricky part will be to test this type of change (see issue: #3920). We often put a workflow file into a personal repo and try to test it there first as a way to get around the difficulty of testing them before merging.

@smlambert do we just need to verify whether the exclude files exist as the logic???

i.e

jobs:
  verifyFiles:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Check for exclude files
        run: |
          # Check for exclude files in 'openjdk/excludes' directory
          if [ -d "openjdk/excludes" ] && [ "$(ls -A openjdk/excludes)" ]; then
            echo "Exclude files found in 'openjdk/excludes'."
            # Add any necessary actions if exclude files are found
          else
            echo "No exclude files found in 'openjdk/excludes'."
            # Add any necessary actions if exclude files are not found
          fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorporate the disabled_tests scripts into PR check
2 participants