This repository was archived by the owner on May 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,25 @@ jobs:
21
21
uses : actions/checkout@v3
22
22
if : github.event_name == 'workflow_dispatch'
23
23
24
- - name : Check files using the ruff formatter
24
+ # This is used for forked PRs as write permissions are required to format files
25
+ - name : Run and commit changes with `ruff format .` locally on your forked branch to fix errors if they appear
26
+ if : ${{ github.event.pull_request.head.repo.fork == true }}
27
+ uses : chartboost/ruff-action@v1
28
+ id : ruff_formatter_suggestions
29
+ with :
30
+ args : format --diff
31
+
32
+ # This only runs if the PR is NOT from a forked repo
33
+ - name : Format files using ruff
34
+ if : ${{ github.event.pull_request.head.repo.fork == false }}
25
35
uses : chartboost/ruff-action@v1
26
36
id : ruff_formatter
27
37
with :
28
38
args : format
29
39
40
+ # This only runs if the PR is NOT from a forked repo
30
41
- name : Auto commit ruff formatting
42
+ if : ${{ github.event.pull_request.head.repo.fork == false }}
31
43
uses : stefanzweifel/git-auto-commit-action@v5
32
44
with :
33
- commit_message : ' style fixes by ruff'
45
+ commit_message : ' style fixes by ruff'
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ def test_integration_basic_dbt(self):
46
46
# 1 with a diff
47
47
assert diff_string .count (" Rows Added Rows Removed" ) == 1
48
48
49
+ @unittest .skipIf (
50
+ not os .environ .get ("MOTHERDUCK_TOKEN" ),
51
+ "MOTHERDUCK_TOKEN doesn't exist or is empty if this is run from a forked branch pull request" ,
52
+ )
49
53
def test_integration_motherduck_dbt (self ):
50
54
artifacts_path = os .getcwd () + "/tests/dbt_artifacts"
51
55
test_project_path = os .environ .get ("DATA_DIFF_DBT_PROJ" ) or artifacts_path
You can’t perform that action at this time.
0 commit comments