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

dummy pr #41

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,31 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: Fetch main branch
run: git fetch origin main:main
- name: Check changes
id: check
run: |
echo "python_changed=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep '\.py$')" >> "$GITHUB_OUTPUT"
echo "toml_changed=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep '\.toml$')" >> "$GITHUB_OUTPUT"
# Set the base reference for the git diff
BASE_REF=${{ github.event.pull_request.base.ref || 'main' }}

# Check for changes in this PR / commit
git_diff_output=$(git diff --name-only $BASE_REF ${{ github.event.after }})

# Count the number of changes to Python and TOML files
python_changed=$(echo "$git_diff_output" | grep '\.py$' | wc -l)
toml_changed=$(echo "$git_diff_output" | grep '\.toml$' | wc -l)

# Write the changes to the GITHUB_OUTPUT environment file
echo "python_changed=$python_changed" >> $GITHUB_OUTPUT
echo "toml_changed=$toml_changed" >> $GITHUB_OUTPUT

tests:
needs: check_changes
if: needs.check_changes.outputs.python_changed != '' || needs.check_changes.outputs.toml_changed != '' || github.event_name == 'workflow_dispatch'
if: needs.check_changes.outputs.python_changed > 0 || needs.check_changes.outputs.toml_changed > 0 || github.event_name == 'workflow_dispatch'
name: Python ${{ matrix.python-version }} with PySpark ${{ matrix.pyspark-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -91,7 +107,7 @@ jobs:

needs:
- check_changes
- tests
- tests

runs-on: ubuntu-latest

Expand All @@ -100,4 +116,4 @@ jobs:
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
allowed-skips: tests
allowed-skips: tests
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Koheesio

<div align="center">

<img src="https://raw.githubusercontent.com/Nike-Inc/koheesio/main/docs/assets/logo_koheesio.svg" alt="Koheesio logo" width="500" role="img">
</div>

Expand Down