diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 6b42fdad45f..dfdb7351310 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -12,11 +12,7 @@ on: branches: - develop - main - types: [opened, synchronize, closed] - push: - branches: - - develop - - main + types: [opened, synchronize, reopened, closed] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -27,11 +23,21 @@ jobs: python-changes: name: Check for changes to Python code runs-on: ubuntu-latest + if: github.event.pull_request.merged != true outputs: python-changes: ${{ steps.python-changes.outputs.python-changes }} steps: - - name: Checkout Code + - name: Checkout uses: actions/checkout@v1 + with: + # Need to fetch more than the last commit so that setuptools-scm can + # create the correct version string. If the number of commits since + # the last release is greater than this, the version still be wrong. + # Increase if necessary. + fetch-depth: 100 + # The GitHub token is preserved by default but this job doesn't need + # to be able to push to GitHub. + persist-credentials: false # Check for changes to Python code to avoid running tests unnecessarily - name: Check for changes to Python code @@ -42,7 +48,7 @@ jobs: target_branch=$(jq -r .pull_request.base.ref "$GITHUB_EVENT_PATH") # Check for changes to Python code to avoid running tests unnecessarily - if git diff --name-only origin/$target_branch HEAD | grep -E '\.py$'; then + if git diff --name-only origin/$target_branch HEAD | grep -E "\.py$"; then echo "python-changes=true" >> $GITHUB_OUTPUT else echo "python-changes=false" >> $GITHUB_OUTPUT diff --git a/gitflow.py b/gitflow.py index 7df869a15e7..922fe1f0de9 100644 --- a/gitflow.py +++ b/gitflow.py @@ -1 +1,4 @@ print("Hello, World!") + +# print another +print("Hello, World!") \ No newline at end of file