From e7dbe8a186f3174bbf6384d431d22804d3f0b34d Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 7 May 2025 11:41:17 -0700 Subject: [PATCH 01/15] Update pytype_selfhost.yaml --- .github/workflows/pytype_selfhost.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytype_selfhost.yaml b/.github/workflows/pytype_selfhost.yaml index 036579e..682c5a5 100644 --- a/.github/workflows/pytype_selfhost.yaml +++ b/.github/workflows/pytype_selfhost.yaml @@ -6,7 +6,7 @@ on: jobs: check: - runs-on: 'ubuntu-latest' + runs-on: 'self-hosted' steps: - uses: 'actions/checkout@v2' - name: 'pytypes checker' From 940186743e7a5e4b64b3f1abeff98dbc6a87f265 Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 17:40:56 +0000 Subject: [PATCH 02/15] Add debugging info. --- .github/workflows/python.yaml | 37 ++++++++++++++++++-------- .github/workflows/python_selfhost.yaml | 37 +++++++++++++++++++------- 2 files changed, 53 insertions(+), 21 deletions(-) diff --git a/.github/workflows/python.yaml b/.github/workflows/python.yaml index 8f0972b..d572102 100644 --- a/.github/workflows/python.yaml +++ b/.github/workflows/python.yaml @@ -1,32 +1,47 @@ -name: 'Python lint and test' +name: "Python lint and test" on: - push: + push: workflow_dispatch: jobs: build: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" strategy: matrix: - python-version: ['3.12'] + python-version: ["3.12"] steps: - - uses: 'actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744' # ratchet:actions/checkout@v3 - - name: 'Set up Python ${{ matrix.python-version }}' - uses: 'actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236' # ratchet:actions/setup-python@v4 + - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # ratchet:actions/checkout@v4 + - name: "Set up Python ${{ matrix.python-version }}" + uses: "actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065" # ratchet:actions/setup-python@v5 with: - python-version: '${{ matrix.python-version }}' - - name: 'Install dependencies' + python-version: "${{ matrix.python-version }}" + - name: "Install dependencies" run: | python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: 'Lint with ruff' + python -m pip install pytype pytest + - name: "Lint with ruff" run: | # stop the build if there are Python syntax errors or undefined names ruff --output-format=github --select=E9,F63,F7,F82 --target-version=py37 . # default set of ruff rules with GitHub Annotations ruff --output-format=github --target-version=py37 . - - name: 'Test with pytest' + - name: "Debug: Check environment, versions, and file structure" + run: | + echo "Current directory: $(pwd)" + echo "--------------------------------------------------" + echo "Python version: $(python --version)" + echo "pip version: $(pip --version)" + echo "pytest version: $(pytest --version)" + echo "pytype version: $(pytype --version || echo 'pytype not found or pytype --version failed')" + echo "--------------------------------------------------" + echo "Listing files in current directory (workspace root):" + ls -laR . + echo "--------------------------------------------------" + echo "Attempting to list google/github_nonpublic_api/ specifically:" + ls -la google/github_nonpublic_api/ || echo "Directory google/github_nonpublic_api/ not found or ls failed." + - name: "Test with pytest" run: | pytest diff --git a/.github/workflows/python_selfhost.yaml b/.github/workflows/python_selfhost.yaml index ee883b1..3f24c30 100644 --- a/.github/workflows/python_selfhost.yaml +++ b/.github/workflows/python_selfhost.yaml @@ -1,4 +1,4 @@ -name: 'Python lint and test (self-hosted)' +name: "Python lint and test (self-hosted)" on: push: @@ -6,27 +6,44 @@ on: jobs: build: - runs-on: 'self-hosted' + runs-on: "self-hosted" strategy: matrix: - python-version: ['3.12'] + python-version: ["3.12"] steps: - - uses: 'actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744' # ratchet:actions/checkout@v3 - - name: 'Set up Python ${{ matrix.python-version }}' - uses: 'actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236' # ratchet:actions/setup-python@v4 + - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # ratchet:actions/checkout@v4 + - name: "Set up Python ${{ matrix.python-version }}" + uses: "actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065" # ratchet:actions/setup-python@v5 with: - python-version: '${{ matrix.python-version }}' - - name: 'Install dependencies' + python-version: "${{ matrix.python-version }}" + - name: "Install dependencies" run: | python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: 'Lint with ruff' + # Ensure pytype and pytest are installed for debugging and test execution + # Adjust if you have specific versions in your requirements.txt + python -m pip install pytype pytest + - name: "Lint with ruff" run: | # stop the build if there are Python syntax errors or undefined names ruff --output-format=github --select=E9,F63,F7,F82 --target-version=py37 . # default set of ruff rules with GitHub Annotations ruff --output-format=github --target-version=py37 . - - name: 'Test with pytest' + - name: "Debug: Check environment, versions, and file structure" + run: | + echo "Current directory: $(pwd)" + echo "--------------------------------------------------" + echo "Python version: $(python --version)" + echo "pip version: $(pip --version)" + echo "pytest version: $(pytest --version)" + echo "pytype version: $(pytype --version || echo 'pytype not found or pytype --version failed')" + echo "--------------------------------------------------" + echo "Listing files in current directory (workspace root):" + ls -laR . + echo "--------------------------------------------------" + echo "Attempting to list google/github_nonpublic_api/ specifically:" + ls -la google/github_nonpublic_api/ || echo "Directory google/github_nonpublic_api/ not found or ls failed." + - name: "Test with pytest" run: | pytest From 9e0168d540f791c0bea65b2329e5565d651b3437 Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 17:44:45 +0000 Subject: [PATCH 03/15] Debug. --- .github/workflows/pytype.yaml | 17 ++++++++++++----- .github/workflows/pytype_selfhost.yaml | 20 +++++++++++++------- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pytype.yaml b/.github/workflows/pytype.yaml index b8f707d..d251d95 100644 --- a/.github/workflows/pytype.yaml +++ b/.github/workflows/pytype.yaml @@ -2,13 +2,20 @@ name: pytype check on: push: + workflow_dispatch: jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: pytypes checker - uses: theahura/pytypes-action@main - with: - args: -d import-error \ No newline at end of file + - name: "Checkout code" + uses: actions/checkout@v2 + - name: "Debug: List files before pytype" + run: | + echo "Current directory: $(pwd)" + echo "Listing files in $GITHUB_WORKSPACE:" + ls -laR "$GITHUB_WORKSPACE" + - name: pytypes checker + uses: theahura/pytypes-action@main + with: + args: -d import-error diff --git a/.github/workflows/pytype_selfhost.yaml b/.github/workflows/pytype_selfhost.yaml index 682c5a5..21a3bbc 100644 --- a/.github/workflows/pytype_selfhost.yaml +++ b/.github/workflows/pytype_selfhost.yaml @@ -1,4 +1,4 @@ -name: 'pytype check (self-hosted)' +name: "pytype check (self-hosted)" on: push: @@ -6,10 +6,16 @@ on: jobs: check: - runs-on: 'self-hosted' + runs-on: "self-hosted" steps: - - uses: 'actions/checkout@v2' - - name: 'pytypes checker' - uses: 'theahura/pytypes-action@main' - with: - args: '-d import-error' + - name: "Checkout code" + uses: "actions/checkout@v2" + - name: "Debug: List files before pytype" + run: | + echo "Current directory: $(pwd)" + echo "Listing files in $GITHUB_WORKSPACE:" + ls -laR "$GITHUB_WORKSPACE" + - name: "pytypes checker" + uses: "theahura/pytypes-action@main" + with: + args: "-d import-error ." From 3046bc07cabd30691015bdad8728fc6784738659 Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 17:45:06 +0000 Subject: [PATCH 04/15] Reset files. --- .github/workflows/python.yaml | 15 --------------- .github/workflows/python_selfhost.yaml | 17 ----------------- 2 files changed, 32 deletions(-) diff --git a/.github/workflows/python.yaml b/.github/workflows/python.yaml index d572102..4df779b 100644 --- a/.github/workflows/python.yaml +++ b/.github/workflows/python.yaml @@ -21,27 +21,12 @@ jobs: run: | python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - python -m pip install pytype pytest - name: "Lint with ruff" run: | # stop the build if there are Python syntax errors or undefined names ruff --output-format=github --select=E9,F63,F7,F82 --target-version=py37 . # default set of ruff rules with GitHub Annotations ruff --output-format=github --target-version=py37 . - - name: "Debug: Check environment, versions, and file structure" - run: | - echo "Current directory: $(pwd)" - echo "--------------------------------------------------" - echo "Python version: $(python --version)" - echo "pip version: $(pip --version)" - echo "pytest version: $(pytest --version)" - echo "pytype version: $(pytype --version || echo 'pytype not found or pytype --version failed')" - echo "--------------------------------------------------" - echo "Listing files in current directory (workspace root):" - ls -laR . - echo "--------------------------------------------------" - echo "Attempting to list google/github_nonpublic_api/ specifically:" - ls -la google/github_nonpublic_api/ || echo "Directory google/github_nonpublic_api/ not found or ls failed." - name: "Test with pytest" run: | pytest diff --git a/.github/workflows/python_selfhost.yaml b/.github/workflows/python_selfhost.yaml index 3f24c30..13a968f 100644 --- a/.github/workflows/python_selfhost.yaml +++ b/.github/workflows/python_selfhost.yaml @@ -21,29 +21,12 @@ jobs: run: | python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - # Ensure pytype and pytest are installed for debugging and test execution - # Adjust if you have specific versions in your requirements.txt - python -m pip install pytype pytest - name: "Lint with ruff" run: | # stop the build if there are Python syntax errors or undefined names ruff --output-format=github --select=E9,F63,F7,F82 --target-version=py37 . # default set of ruff rules with GitHub Annotations ruff --output-format=github --target-version=py37 . - - name: "Debug: Check environment, versions, and file structure" - run: | - echo "Current directory: $(pwd)" - echo "--------------------------------------------------" - echo "Python version: $(python --version)" - echo "pip version: $(pip --version)" - echo "pytest version: $(pytest --version)" - echo "pytype version: $(pytype --version || echo 'pytype not found or pytype --version failed')" - echo "--------------------------------------------------" - echo "Listing files in current directory (workspace root):" - ls -laR . - echo "--------------------------------------------------" - echo "Attempting to list google/github_nonpublic_api/ specifically:" - ls -la google/github_nonpublic_api/ || echo "Directory google/github_nonpublic_api/ not found or ls failed." - name: "Test with pytest" run: | pytest From 25e766ce8150566bd81b3d2372509f09b60f1f31 Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 17:54:09 +0000 Subject: [PATCH 05/15] Debug. --- .github/workflows/pytype.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytype.yaml b/.github/workflows/pytype.yaml index d251d95..6f79be5 100644 --- a/.github/workflows/pytype.yaml +++ b/.github/workflows/pytype.yaml @@ -18,4 +18,4 @@ jobs: - name: pytypes checker uses: theahura/pytypes-action@main with: - args: -d import-error + args: "-d import-error ." From 43c90c482720f858021829db5111c6f020b43601 Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 17:57:13 +0000 Subject: [PATCH 06/15] Add more logging. --- .github/workflows/pytype.yaml | 7 ++++++- .github/workflows/pytype_selfhost.yaml | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytype.yaml b/.github/workflows/pytype.yaml index 6f79be5..a452cc5 100644 --- a/.github/workflows/pytype.yaml +++ b/.github/workflows/pytype.yaml @@ -15,7 +15,12 @@ jobs: echo "Current directory: $(pwd)" echo "Listing files in $GITHUB_WORKSPACE:" ls -laR "$GITHUB_WORKSPACE" + - name: "Debug: List temp files before pytype" + run: | + echo "Current directory: $(pwd)" + echo "Listing files in temp:" + ls -laR "/home/runner/work/_temp" - name: pytypes checker uses: theahura/pytypes-action@main with: - args: "-d import-error ." + args: -d import-error diff --git a/.github/workflows/pytype_selfhost.yaml b/.github/workflows/pytype_selfhost.yaml index 21a3bbc..9b9c951 100644 --- a/.github/workflows/pytype_selfhost.yaml +++ b/.github/workflows/pytype_selfhost.yaml @@ -15,7 +15,12 @@ jobs: echo "Current directory: $(pwd)" echo "Listing files in $GITHUB_WORKSPACE:" ls -laR "$GITHUB_WORKSPACE" + - name: "Debug: List temp files before pytype" + run: | + echo "Current directory: $(pwd)" + echo "Listing files in temp:" + ls -laR "/actions-runner/_work/_temp" - name: "pytypes checker" uses: "theahura/pytypes-action@main" with: - args: "-d import-error ." + args: -d import-error From 31ab7d250703b97bdb6fbd7b65b329f7cfd7293f Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 17:59:56 +0000 Subject: [PATCH 07/15] Debug. --- .github/workflows/pytype.yaml | 11 +++++++++++ .github/workflows/pytype_selfhost.yaml | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/pytype.yaml b/.github/workflows/pytype.yaml index a452cc5..6b51c1b 100644 --- a/.github/workflows/pytype.yaml +++ b/.github/workflows/pytype.yaml @@ -20,6 +20,17 @@ jobs: echo "Current directory: $(pwd)" echo "Listing files in temp:" ls -laR "/home/runner/work/_temp" + - name: "Debug: Test Docker action workspace mount" + run: | + echo "Host GITHUB_WORKSPACE is: $GITHUB_WORKSPACE" + echo "Contents of GITHUB_WORKSPACE on host:" + ls -laR "$GITHUB_WORKSPACE" + echo "Running basic Docker action to check mounted workspace..." + # This uses a simple alpine image to list contents of /github/workspace + # GitHub Actions automatically mounts $GITHUB_WORKSPACE to /github/workspace in Docker actions + docker run --rm -v "$GITHUB_WORKSPACE:/github/workspace" -w "/github/workspace" \ + alpine sh -c "echo '--- Inside container ---'; pwd; echo 'Contents of /github/workspace:'; ls -laR; echo '--- End of container ---'" + shell: bash # Ensures $GITHUB_WORKSPACE is expanded correctly - name: pytypes checker uses: theahura/pytypes-action@main with: diff --git a/.github/workflows/pytype_selfhost.yaml b/.github/workflows/pytype_selfhost.yaml index 9b9c951..a66440e 100644 --- a/.github/workflows/pytype_selfhost.yaml +++ b/.github/workflows/pytype_selfhost.yaml @@ -20,6 +20,17 @@ jobs: echo "Current directory: $(pwd)" echo "Listing files in temp:" ls -laR "/actions-runner/_work/_temp" + - name: "Debug: Test Docker action workspace mount" + run: | + echo "Host GITHUB_WORKSPACE is: $GITHUB_WORKSPACE" + echo "Contents of GITHUB_WORKSPACE on host:" + ls -laR "$GITHUB_WORKSPACE" + echo "Running basic Docker action to check mounted workspace..." + # This uses a simple alpine image to list contents of /github/workspace + # GitHub Actions automatically mounts $GITHUB_WORKSPACE to /github/workspace in Docker actions + docker run --rm -v "$GITHUB_WORKSPACE:/github/workspace" -w "/github/workspace" \ + alpine sh -c "echo '--- Inside container ---'; pwd; echo 'Contents of /github/workspace:'; ls -laR; echo '--- End of container ---'" + shell: bash # Ensures $GITHUB_WORKSPACE is expanded correctly - name: "pytypes checker" uses: "theahura/pytypes-action@main" with: From 141fa83f10fd7f3e57826113ce3b9ad324e5b476 Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 18:08:13 +0000 Subject: [PATCH 08/15] Debug. --- .github/workflows/pytype.yaml | 43 ++++++++++++++++++++++++++ .github/workflows/pytype_selfhost.yaml | 43 ++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/.github/workflows/pytype.yaml b/.github/workflows/pytype.yaml index 6b51c1b..0dc8d34 100644 --- a/.github/workflows/pytype.yaml +++ b/.github/workflows/pytype.yaml @@ -31,6 +31,49 @@ jobs: docker run --rm -v "$GITHUB_WORKSPACE:/github/workspace" -w "/github/workspace" \ alpine sh -c "echo '--- Inside container ---'; pwd; echo 'Contents of /github/workspace:'; ls -laR; echo '--- End of container ---'" shell: bash # Ensures $GITHUB_WORKSPACE is expanded correctly + - name: "TEMP DEBUG: Advanced Docker Mount Test" + shell: bash + run: | + echo "--------------------------------------------------------------------------------" + echo "DEBUG: Current User: $(id -u -n) (UID $(id -u))" + echo "DEBUG: GITHUB_WORKSPACE is: $GITHUB_WORKSPACE" + echo "DEBUG: Contents of GITHUB_WORKSPACE (from runner's perspective):" + ls -laR "$GITHUB_WORKSPACE" + echo "--------------------------------------------------------------------------------" + echo "DEBUG: Creating a test file in a known simple location (/runner_test_data)..." + # Create as root then change ownership, as runner might not have perms in / + sudo mkdir -p /runner_test_data + sudo chown "$(id -u):$(id -g)" /runner_test_data # Use current user/group + echo "Hello from DinD host" > /runner_test_data/testfile.txt + echo "DEBUG: Contents of /runner_test_data:" + ls -laR /runner_test_data + echo "--------------------------------------------------------------------------------" + echo "DEBUG: Attempting to mount /runner_test_data into an alpine container..." + docker run --rm \ + -v "/runner_test_data:/mnt/test_data" \ + -w "/mnt/test_data" \ + alpine sh -c " \ + echo '--- Inside alpine (/runner_test_data mount) ---'; \ + pwd; \ + echo 'Contents:'; \ + ls -laR; \ + echo 'Content of testfile.txt:'; \ + cat testfile.txt || echo 'testfile.txt NOT FOUND'; \ + echo '--- End alpine (/runner_test_data mount) ---' \ + " + echo "--------------------------------------------------------------------------------" + echo "DEBUG: Attempting to mount GITHUB_WORKSPACE ($GITHUB_WORKSPACE) into an alpine container again..." + docker run --rm \ + -v "$GITHUB_WORKSPACE:/github/workspace" \ + -w "/github/workspace" \ + alpine sh -c " \ + echo '--- Inside alpine (GITHUB_WORKSPACE mount) ---'; \ + pwd; \ + echo 'Contents:'; \ + ls -laR; \ + echo '--- End alpine (GITHUB_WORKSPACE mount) ---' \ + " + echo "--------------------------------------------------------------------------------" - name: pytypes checker uses: theahura/pytypes-action@main with: diff --git a/.github/workflows/pytype_selfhost.yaml b/.github/workflows/pytype_selfhost.yaml index a66440e..4bef9fc 100644 --- a/.github/workflows/pytype_selfhost.yaml +++ b/.github/workflows/pytype_selfhost.yaml @@ -31,6 +31,49 @@ jobs: docker run --rm -v "$GITHUB_WORKSPACE:/github/workspace" -w "/github/workspace" \ alpine sh -c "echo '--- Inside container ---'; pwd; echo 'Contents of /github/workspace:'; ls -laR; echo '--- End of container ---'" shell: bash # Ensures $GITHUB_WORKSPACE is expanded correctly + - name: "TEMP DEBUG: Advanced Docker Mount Test" + shell: bash + run: | + echo "--------------------------------------------------------------------------------" + echo "DEBUG: Current User: $(id -u -n) (UID $(id -u))" + echo "DEBUG: GITHUB_WORKSPACE is: $GITHUB_WORKSPACE" + echo "DEBUG: Contents of GITHUB_WORKSPACE (from runner's perspective):" + ls -laR "$GITHUB_WORKSPACE" + echo "--------------------------------------------------------------------------------" + echo "DEBUG: Creating a test file in a known simple location (/runner_test_data)..." + # Create as root then change ownership, as runner might not have perms in / + sudo mkdir -p /runner_test_data + sudo chown "$(id -u):$(id -g)" /runner_test_data # Use current user/group + echo "Hello from DinD host" > /runner_test_data/testfile.txt + echo "DEBUG: Contents of /runner_test_data:" + ls -laR /runner_test_data + echo "--------------------------------------------------------------------------------" + echo "DEBUG: Attempting to mount /runner_test_data into an alpine container..." + docker run --rm \ + -v "/runner_test_data:/mnt/test_data" \ + -w "/mnt/test_data" \ + alpine sh -c " \ + echo '--- Inside alpine (/runner_test_data mount) ---'; \ + pwd; \ + echo 'Contents:'; \ + ls -laR; \ + echo 'Content of testfile.txt:'; \ + cat testfile.txt || echo 'testfile.txt NOT FOUND'; \ + echo '--- End alpine (/runner_test_data mount) ---' \ + " + echo "--------------------------------------------------------------------------------" + echo "DEBUG: Attempting to mount GITHUB_WORKSPACE ($GITHUB_WORKSPACE) into an alpine container again..." + docker run --rm \ + -v "$GITHUB_WORKSPACE:/github/workspace" \ + -w "/github/workspace" \ + alpine sh -c " \ + echo '--- Inside alpine (GITHUB_WORKSPACE mount) ---'; \ + pwd; \ + echo 'Contents:'; \ + ls -laR; \ + echo '--- End alpine (GITHUB_WORKSPACE mount) ---' \ + " + echo "--------------------------------------------------------------------------------" - name: "pytypes checker" uses: "theahura/pytypes-action@main" with: From cb03bcd589641c03c3580abad39de939c33b289a Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 21:01:33 +0000 Subject: [PATCH 09/15] Revert. --- .github/workflows/pytype.yaml | 64 -------------------------- .github/workflows/pytype_selfhost.yaml | 64 -------------------------- 2 files changed, 128 deletions(-) diff --git a/.github/workflows/pytype.yaml b/.github/workflows/pytype.yaml index 0dc8d34..a38c792 100644 --- a/.github/workflows/pytype.yaml +++ b/.github/workflows/pytype.yaml @@ -10,70 +10,6 @@ jobs: steps: - name: "Checkout code" uses: actions/checkout@v2 - - name: "Debug: List files before pytype" - run: | - echo "Current directory: $(pwd)" - echo "Listing files in $GITHUB_WORKSPACE:" - ls -laR "$GITHUB_WORKSPACE" - - name: "Debug: List temp files before pytype" - run: | - echo "Current directory: $(pwd)" - echo "Listing files in temp:" - ls -laR "/home/runner/work/_temp" - - name: "Debug: Test Docker action workspace mount" - run: | - echo "Host GITHUB_WORKSPACE is: $GITHUB_WORKSPACE" - echo "Contents of GITHUB_WORKSPACE on host:" - ls -laR "$GITHUB_WORKSPACE" - echo "Running basic Docker action to check mounted workspace..." - # This uses a simple alpine image to list contents of /github/workspace - # GitHub Actions automatically mounts $GITHUB_WORKSPACE to /github/workspace in Docker actions - docker run --rm -v "$GITHUB_WORKSPACE:/github/workspace" -w "/github/workspace" \ - alpine sh -c "echo '--- Inside container ---'; pwd; echo 'Contents of /github/workspace:'; ls -laR; echo '--- End of container ---'" - shell: bash # Ensures $GITHUB_WORKSPACE is expanded correctly - - name: "TEMP DEBUG: Advanced Docker Mount Test" - shell: bash - run: | - echo "--------------------------------------------------------------------------------" - echo "DEBUG: Current User: $(id -u -n) (UID $(id -u))" - echo "DEBUG: GITHUB_WORKSPACE is: $GITHUB_WORKSPACE" - echo "DEBUG: Contents of GITHUB_WORKSPACE (from runner's perspective):" - ls -laR "$GITHUB_WORKSPACE" - echo "--------------------------------------------------------------------------------" - echo "DEBUG: Creating a test file in a known simple location (/runner_test_data)..." - # Create as root then change ownership, as runner might not have perms in / - sudo mkdir -p /runner_test_data - sudo chown "$(id -u):$(id -g)" /runner_test_data # Use current user/group - echo "Hello from DinD host" > /runner_test_data/testfile.txt - echo "DEBUG: Contents of /runner_test_data:" - ls -laR /runner_test_data - echo "--------------------------------------------------------------------------------" - echo "DEBUG: Attempting to mount /runner_test_data into an alpine container..." - docker run --rm \ - -v "/runner_test_data:/mnt/test_data" \ - -w "/mnt/test_data" \ - alpine sh -c " \ - echo '--- Inside alpine (/runner_test_data mount) ---'; \ - pwd; \ - echo 'Contents:'; \ - ls -laR; \ - echo 'Content of testfile.txt:'; \ - cat testfile.txt || echo 'testfile.txt NOT FOUND'; \ - echo '--- End alpine (/runner_test_data mount) ---' \ - " - echo "--------------------------------------------------------------------------------" - echo "DEBUG: Attempting to mount GITHUB_WORKSPACE ($GITHUB_WORKSPACE) into an alpine container again..." - docker run --rm \ - -v "$GITHUB_WORKSPACE:/github/workspace" \ - -w "/github/workspace" \ - alpine sh -c " \ - echo '--- Inside alpine (GITHUB_WORKSPACE mount) ---'; \ - pwd; \ - echo 'Contents:'; \ - ls -laR; \ - echo '--- End alpine (GITHUB_WORKSPACE mount) ---' \ - " - echo "--------------------------------------------------------------------------------" - name: pytypes checker uses: theahura/pytypes-action@main with: diff --git a/.github/workflows/pytype_selfhost.yaml b/.github/workflows/pytype_selfhost.yaml index 4bef9fc..4b04d43 100644 --- a/.github/workflows/pytype_selfhost.yaml +++ b/.github/workflows/pytype_selfhost.yaml @@ -10,70 +10,6 @@ jobs: steps: - name: "Checkout code" uses: "actions/checkout@v2" - - name: "Debug: List files before pytype" - run: | - echo "Current directory: $(pwd)" - echo "Listing files in $GITHUB_WORKSPACE:" - ls -laR "$GITHUB_WORKSPACE" - - name: "Debug: List temp files before pytype" - run: | - echo "Current directory: $(pwd)" - echo "Listing files in temp:" - ls -laR "/actions-runner/_work/_temp" - - name: "Debug: Test Docker action workspace mount" - run: | - echo "Host GITHUB_WORKSPACE is: $GITHUB_WORKSPACE" - echo "Contents of GITHUB_WORKSPACE on host:" - ls -laR "$GITHUB_WORKSPACE" - echo "Running basic Docker action to check mounted workspace..." - # This uses a simple alpine image to list contents of /github/workspace - # GitHub Actions automatically mounts $GITHUB_WORKSPACE to /github/workspace in Docker actions - docker run --rm -v "$GITHUB_WORKSPACE:/github/workspace" -w "/github/workspace" \ - alpine sh -c "echo '--- Inside container ---'; pwd; echo 'Contents of /github/workspace:'; ls -laR; echo '--- End of container ---'" - shell: bash # Ensures $GITHUB_WORKSPACE is expanded correctly - - name: "TEMP DEBUG: Advanced Docker Mount Test" - shell: bash - run: | - echo "--------------------------------------------------------------------------------" - echo "DEBUG: Current User: $(id -u -n) (UID $(id -u))" - echo "DEBUG: GITHUB_WORKSPACE is: $GITHUB_WORKSPACE" - echo "DEBUG: Contents of GITHUB_WORKSPACE (from runner's perspective):" - ls -laR "$GITHUB_WORKSPACE" - echo "--------------------------------------------------------------------------------" - echo "DEBUG: Creating a test file in a known simple location (/runner_test_data)..." - # Create as root then change ownership, as runner might not have perms in / - sudo mkdir -p /runner_test_data - sudo chown "$(id -u):$(id -g)" /runner_test_data # Use current user/group - echo "Hello from DinD host" > /runner_test_data/testfile.txt - echo "DEBUG: Contents of /runner_test_data:" - ls -laR /runner_test_data - echo "--------------------------------------------------------------------------------" - echo "DEBUG: Attempting to mount /runner_test_data into an alpine container..." - docker run --rm \ - -v "/runner_test_data:/mnt/test_data" \ - -w "/mnt/test_data" \ - alpine sh -c " \ - echo '--- Inside alpine (/runner_test_data mount) ---'; \ - pwd; \ - echo 'Contents:'; \ - ls -laR; \ - echo 'Content of testfile.txt:'; \ - cat testfile.txt || echo 'testfile.txt NOT FOUND'; \ - echo '--- End alpine (/runner_test_data mount) ---' \ - " - echo "--------------------------------------------------------------------------------" - echo "DEBUG: Attempting to mount GITHUB_WORKSPACE ($GITHUB_WORKSPACE) into an alpine container again..." - docker run --rm \ - -v "$GITHUB_WORKSPACE:/github/workspace" \ - -w "/github/workspace" \ - alpine sh -c " \ - echo '--- Inside alpine (GITHUB_WORKSPACE mount) ---'; \ - pwd; \ - echo 'Contents:'; \ - ls -laR; \ - echo '--- End alpine (GITHUB_WORKSPACE mount) ---' \ - " - echo "--------------------------------------------------------------------------------" - name: "pytypes checker" uses: "theahura/pytypes-action@main" with: From 1bbac11696224940a297e7dc54e80aaad667b76f Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 21:37:04 +0000 Subject: [PATCH 10/15] Formatting. --- .github/workflows/python.yaml | 24 ++++++++++++------------ .github/workflows/python_selfhost.yaml | 22 +++++++++++----------- .github/workflows/pytype.yaml | 2 +- .github/workflows/pytype_selfhost.yaml | 12 ++++++------ 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/python.yaml b/.github/workflows/python.yaml index 4df779b..40c083e 100644 --- a/.github/workflows/python.yaml +++ b/.github/workflows/python.yaml @@ -1,32 +1,32 @@ -name: "Python lint and test" +name: 'Python lint and test' on: - push: + push: workflow_dispatch: jobs: build: - runs-on: "ubuntu-latest" + runs-on: 'ubuntu-latest' strategy: matrix: - python-version: ["3.12"] + python-version: ['3.12'] steps: - - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # ratchet:actions/checkout@v4 - - name: "Set up Python ${{ matrix.python-version }}" - uses: "actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065" # ratchet:actions/setup-python@v5 + - uses: 'actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744' # ratchet:actions/checkout@v3 + - name: 'Set up Python ${{ matrix.python-version }}' + uses: 'actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236' # ratchet:actions/setup-python@v4 with: - python-version: "${{ matrix.python-version }}" - - name: "Install dependencies" + python-version: '${{ matrix.python-version }}' + - name: 'Install dependencies' run: | python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: "Lint with ruff" + - name: 'Lint with ruff' run: | # stop the build if there are Python syntax errors or undefined names ruff --output-format=github --select=E9,F63,F7,F82 --target-version=py37 . # default set of ruff rules with GitHub Annotations ruff --output-format=github --target-version=py37 . - - name: "Test with pytest" + - name: 'Test with pytest' run: | - pytest + pytest \ No newline at end of file diff --git a/.github/workflows/python_selfhost.yaml b/.github/workflows/python_selfhost.yaml index 13a968f..44fb99f 100644 --- a/.github/workflows/python_selfhost.yaml +++ b/.github/workflows/python_selfhost.yaml @@ -1,4 +1,4 @@ -name: "Python lint and test (self-hosted)" +name: 'Python lint and test (self-hosted)' on: push: @@ -6,27 +6,27 @@ on: jobs: build: - runs-on: "self-hosted" + runs-on: 'self-hosted' strategy: matrix: - python-version: ["3.12"] + python-version: ['3.12'] steps: - - uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # ratchet:actions/checkout@v4 - - name: "Set up Python ${{ matrix.python-version }}" - uses: "actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065" # ratchet:actions/setup-python@v5 + - uses: 'actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744' # ratchet:actions/checkout@v3 + - name: 'Set up Python ${{ matrix.python-version }}' + uses: 'actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236' # ratchet:actions/setup-python@v4 with: - python-version: "${{ matrix.python-version }}" - - name: "Install dependencies" + python-version: '${{ matrix.python-version }}' + - name: 'Install dependencies' run: | python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: "Lint with ruff" + - name: 'Lint with ruff' run: | # stop the build if there are Python syntax errors or undefined names ruff --output-format=github --select=E9,F63,F7,F82 --target-version=py37 . # default set of ruff rules with GitHub Annotations ruff --output-format=github --target-version=py37 . - - name: "Test with pytest" + - name: 'Test with pytest' run: | - pytest + pytest \ No newline at end of file diff --git a/.github/workflows/pytype.yaml b/.github/workflows/pytype.yaml index a38c792..b76c109 100644 --- a/.github/workflows/pytype.yaml +++ b/.github/workflows/pytype.yaml @@ -8,7 +8,7 @@ jobs: check: runs-on: ubuntu-latest steps: - - name: "Checkout code" + - name: 'Checkout code' uses: actions/checkout@v2 - name: pytypes checker uses: theahura/pytypes-action@main diff --git a/.github/workflows/pytype_selfhost.yaml b/.github/workflows/pytype_selfhost.yaml index 4b04d43..a0681f7 100644 --- a/.github/workflows/pytype_selfhost.yaml +++ b/.github/workflows/pytype_selfhost.yaml @@ -1,4 +1,4 @@ -name: "pytype check (self-hosted)" +name: 'pytype check (self-hosted)' on: push: @@ -6,11 +6,11 @@ on: jobs: check: - runs-on: "self-hosted" + runs-on: 'self-hosted' steps: - - name: "Checkout code" - uses: "actions/checkout@v2" - - name: "pytypes checker" - uses: "theahura/pytypes-action@main" + - name: 'Checkout code' + uses: 'actions/checkout@v2' + - name: 'pytypes checker' + uses: 'theahura/pytypes-action@main' with: args: -d import-error From b5435868fd0bc9b5760dec0479394d026fd3dfb2 Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 21:41:21 +0000 Subject: [PATCH 11/15] Formatting. --- .github/workflows/pytype.yaml | 5 ++--- .github/workflows/pytype_selfhost.yaml | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pytype.yaml b/.github/workflows/pytype.yaml index b76c109..d0794f5 100644 --- a/.github/workflows/pytype.yaml +++ b/.github/workflows/pytype.yaml @@ -8,9 +8,8 @@ jobs: check: runs-on: ubuntu-latest steps: - - name: 'Checkout code' - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - name: pytypes checker uses: theahura/pytypes-action@main with: - args: -d import-error + args: -d import-error \ No newline at end of file diff --git a/.github/workflows/pytype_selfhost.yaml b/.github/workflows/pytype_selfhost.yaml index a0681f7..d34bae8 100644 --- a/.github/workflows/pytype_selfhost.yaml +++ b/.github/workflows/pytype_selfhost.yaml @@ -8,9 +8,8 @@ jobs: check: runs-on: 'self-hosted' steps: - - name: 'Checkout code' - uses: 'actions/checkout@v2' + - uses: 'actions/checkout@v2' - name: 'pytypes checker' uses: 'theahura/pytypes-action@main' with: - args: -d import-error + args: -d import-error \ No newline at end of file From 5a068b67d6a58a143267eb0ad63af5ab5ab431cb Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 21:45:35 +0000 Subject: [PATCH 12/15] Formatting. --- .github/workflows/pytype.yaml | 10 +++++----- .github/workflows/pytype_selfhost.yaml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pytype.yaml b/.github/workflows/pytype.yaml index d0794f5..dc56435 100644 --- a/.github/workflows/pytype.yaml +++ b/.github/workflows/pytype.yaml @@ -8,8 +8,8 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: pytypes checker - uses: theahura/pytypes-action@main - with: - args: -d import-error \ No newline at end of file + - uses: actions/checkout@v2 + - name: pytypes checker + uses: theahura/pytypes-action@main + with: + args: -d import-error \ No newline at end of file diff --git a/.github/workflows/pytype_selfhost.yaml b/.github/workflows/pytype_selfhost.yaml index d34bae8..51e5cfc 100644 --- a/.github/workflows/pytype_selfhost.yaml +++ b/.github/workflows/pytype_selfhost.yaml @@ -8,8 +8,8 @@ jobs: check: runs-on: 'self-hosted' steps: - - uses: 'actions/checkout@v2' - - name: 'pytypes checker' - uses: 'theahura/pytypes-action@main' - with: - args: -d import-error \ No newline at end of file + - uses: 'actions/checkout@v2' + - name: 'pytypes checker' + uses: 'theahura/pytypes-action@main' + with: + args: -d import-error \ No newline at end of file From 63ace6334b676ac5e43835dd60d8504c42a1bfa0 Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 21:51:22 +0000 Subject: [PATCH 13/15] Formatting. --- .github/workflows/pytype.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pytype.yaml b/.github/workflows/pytype.yaml index dc56435..b8f707d 100644 --- a/.github/workflows/pytype.yaml +++ b/.github/workflows/pytype.yaml @@ -2,7 +2,6 @@ name: pytype check on: push: - workflow_dispatch: jobs: check: From 7123152f8391b8d7d0896287e0210a1688577cad Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 21:53:02 +0000 Subject: [PATCH 14/15] Formatting. --- .github/workflows/pytype_selfhost.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytype_selfhost.yaml b/.github/workflows/pytype_selfhost.yaml index 51e5cfc..682c5a5 100644 --- a/.github/workflows/pytype_selfhost.yaml +++ b/.github/workflows/pytype_selfhost.yaml @@ -12,4 +12,4 @@ jobs: - name: 'pytypes checker' uses: 'theahura/pytypes-action@main' with: - args: -d import-error \ No newline at end of file + args: '-d import-error' From 7a3e5f9e80c7a53d13bbc15a97b92645af78cf42 Mon Sep 17 00:00:00 2001 From: Paul Berruti Date: Tue, 13 May 2025 21:54:07 +0000 Subject: [PATCH 15/15] Formatting (last one?) --- .github/workflows/python.yaml | 2 +- .github/workflows/python_selfhost.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python.yaml b/.github/workflows/python.yaml index 40c083e..8f0972b 100644 --- a/.github/workflows/python.yaml +++ b/.github/workflows/python.yaml @@ -29,4 +29,4 @@ jobs: ruff --output-format=github --target-version=py37 . - name: 'Test with pytest' run: | - pytest \ No newline at end of file + pytest diff --git a/.github/workflows/python_selfhost.yaml b/.github/workflows/python_selfhost.yaml index 44fb99f..ee883b1 100644 --- a/.github/workflows/python_selfhost.yaml +++ b/.github/workflows/python_selfhost.yaml @@ -29,4 +29,4 @@ jobs: ruff --output-format=github --target-version=py37 . - name: 'Test with pytest' run: | - pytest \ No newline at end of file + pytest