File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -84,18 +84,30 @@ jobs:
84
84
uses : taiki-e/install-action@cargo-llvm-cov
85
85
86
86
- name : Set up BigQuery environment variables and credentials
87
+ if : ${{ secrets.TESTS_BIGQUERY_SA_KEY_JSON != '' && secrets.TESTS_BIGQUERY_PROJECT_ID != '' }}
87
88
run : |
88
89
printf '%s' '${{ secrets.TESTS_BIGQUERY_SA_KEY_JSON }}' > /tmp/bigquery-sa-key.json
89
90
echo "TESTS_BIGQUERY_PROJECT_ID=${{ secrets.TESTS_BIGQUERY_PROJECT_ID }}" >> $GITHUB_ENV
90
91
echo "TESTS_BIGQUERY_SA_KEY_PATH=/tmp/bigquery-sa-key.json" >> $GITHUB_ENV
92
+ echo "BIGQUERY_TESTS_ENABLED=true" >> $GITHUB_ENV
91
93
92
94
- name : Generate code coverage
93
95
id : coverage
94
96
run : |
95
- cargo llvm-cov test \
96
- --workspace --no-fail-fast \
97
- --all-features \
98
- --lcov --output-path lcov.info
97
+ if [ "$BIGQUERY_TESTS_ENABLED" = "true" ]; then
98
+ echo "Running all tests including BigQuery integration tests"
99
+ cargo llvm-cov test \
100
+ --workspace --no-fail-fast \
101
+ --all-features \
102
+ --lcov --output-path lcov.info
103
+ else
104
+ echo "Running tests excluding BigQuery integration tests (credentials not available)"
105
+ cargo llvm-cov test \
106
+ --workspace --no-fail-fast \
107
+ --all-features \
108
+ --lcov --output-path lcov.info \
109
+ -- --skip bigquery
110
+ fi
99
111
100
112
- name : Upload coverage to Coveralls
101
113
uses : coverallsapp/github-action@v2
You can’t perform that action at this time.
0 commit comments