Skip to content

Commit

Permalink
Test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneLightsOn committed Sep 13, 2024
1 parent 70e88d3 commit 804e5c2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/python-typecheck-new-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Typecheck

on:
push:
branches: [eugene/test-workflow]
pull_request: {}

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'poetry'
- run: poetry install
- run: echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
- name: Get new files added in the PR
id: get_new_files
run: |
git fetch origin main
NEW_PY_FILES=$(git diff --name-only --diff-filter=A origin/main HEAD | grep '\.py$' | tr '\n' ' ')
echo "New files: $NEW_PY_FILES"
echo "new_py_files=$NEW_PY_FILES" >> $GITHUB_OUTPUT
- name: Typecheck new files
uses: jakebailey/pyright-action@v2
with:
version: 1.1.311
extra-args: ${{ steps.get_new_files.outputs.new_py_files }}
12 changes: 0 additions & 12 deletions .github/workflows/python-typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,3 @@ jobs:
- uses: jakebailey/pyright-action@v2
with:
version: 1.1.311
- name: Get new files added in the PR
id: get_new_files
run: |
git fetch origin main
NEW_PY_FILES=$(git diff --name-only --diff-filter=A origin/main HEAD | grep '\.py$' | tr '\n' ' ')
echo "New files: $NEW_PY_FILES"
echo "new_py_files=$NEW_PY_FILES" >> $GITHUB_OUTPUT
- name: Typecheck new files
uses: jakebailey/pyright-action@v2
with:
version: 1.1.311
extra-args: ${{ steps.get_new_files.outputs.new_py_files }}

0 comments on commit 804e5c2

Please sign in to comment.