@@ -42,12 +42,13 @@ jobs:
42
42
43
43
# This will sync the .github folder of the main repo with the fork
44
44
# This allows us to use up to date actions from the main repo
45
- - name : Pull .github folder from main repository
45
+ - name : Pull .github folder and internal packages from main repository
46
46
id : pull_github_folder
47
47
run : |
48
48
git remote add main https://github.com/airbytehq/airbyte.git
49
49
git fetch main ${MAIN_BRANCH_NAME}
50
50
git checkout main/${MAIN_BRANCH_NAME} -- .github
51
+ git checkout main/${MAIN_BRANCH_NAME} -- airbyte-ci
51
52
52
53
- name : Run airbyte-ci format check all
53
54
# This path refers to the fork .github folder.
58
59
sentry_dsn : ${{ secrets.SENTRY_AIRBYTE_CI_DSN }}
59
60
subcommand : " format check all"
60
61
is_fork : " true"
61
- connectors_test :
62
- name : Run connectors tests on fork
62
+ connectors_early_ci :
63
+ name : Run connectors early CI on fork
64
+ if : github.event.pull_request.head.repo.fork == true
65
+ environment : community-ci-auto
66
+ runs-on : community-tooling-test-small
67
+ timeout-minutes : 10
68
+ env :
69
+ MAIN_BRANCH_NAME : " master"
70
+ permissions :
71
+ statuses : write
72
+ steps :
73
+ # This checkouts a fork which can contain untrusted code
74
+ # It's deemed safe as the static checks are not executing any checked out code
75
+ - name : Checkout fork
76
+ uses : actions/checkout@v4
77
+ with :
78
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
79
+ ref : ${{ github.event.pull_request.head.sha }}
80
+ fetch-depth : 1
81
+
82
+ # This will sync the .github folder of the main repo with the fork
83
+ # This allows us to use up to date actions and internal packages logic from the main repo
84
+ # It will also prevent forks from changing CI logic
85
+ - name : Pull .github folder from main repository
86
+ id : pull_github_folder
87
+ run : |
88
+ git remote add main https://github.com/airbytehq/airbyte.git
89
+ git fetch main ${MAIN_BRANCH_NAME}
90
+ git checkout main/${MAIN_BRANCH_NAME} -- .github
91
+ git checkout main/${MAIN_BRANCH_NAME} -- airbyte-ci
92
+
93
+ - name : Run airbyte-ci static checks and version increment checks on modified connectors
94
+ # This path refers to the fork .github folder.
95
+ # We make sure its content is in sync with the main repo .github folder by pulling it in the previous step
96
+ uses : ./.github/actions/run-airbyte-ci
97
+ with :
98
+ context : " pull_request"
99
+ sentry_dsn : ${{ secrets.SENTRY_AIRBYTE_CI_DSN }}
100
+ subcommand : " connectors --modified test --only-step=qa_checks --only-step=version_inc_check --global-status-check-context='Connectors early CI checks' --global-status-check-description='Running early CI checks on connectors'"
101
+ is_fork : " true"
102
+ - name : Upload pipeline reports
103
+ id : upload-artifact
104
+ uses : actions/upload-artifact@v4
105
+ with :
106
+ name : early-ci-pipeline-reports
107
+ path : /home/runner/work/airbyte/airbyte/airbyte-ci/connectors/pipelines/pipeline_reports/airbyte-ci/connectors/test/pull_request/**/output.html
108
+ retention-days : 7
109
+
110
+ connectors_full_ci :
111
+ name : Run all connectors tests on fork
63
112
if : github.event.pull_request.head.repo.fork == true
64
113
# Deployment of jobs on the community-ci environment requires manual approval
65
114
# This is something we set up in the GitHub environment settings:
@@ -83,14 +132,15 @@ jobs:
83
132
ref : ${{ github.event.pull_request.head.sha }}
84
133
fetch-depth : 1
85
134
86
- # This will sync the .github folder of the main repo with the fork
87
- # This allows us to use up to date actions from the main repo
88
- - name : Pull .github folder from main repository
135
+ # This will sync the .github folder of the main repo with the fork
136
+ # This allows us to use up to date actions and internal packages logic from the main repo
137
+ # It will also prevent forks from changing CI logic - name: Pull .github folder from main repository
89
138
id : pull_github_folder
90
139
run : |
91
140
git remote add main https://github.com/airbytehq/airbyte.git
92
141
git fetch main ${MAIN_BRANCH_NAME}
93
142
git checkout main/${MAIN_BRANCH_NAME} -- .github
143
+ git checkout main/${MAIN_BRANCH_NAME} -- airbyte-ci
94
144
95
145
- name : Run airbyte-ci connectors test
96
146
# This path refers to the fork .github folder.
0 commit comments