-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementation of specifying collections to be tested in pull request…
… body (#92) * feat: added parameter for collections to be build; testing possibility to define them in pull request * fix: added missing quotes * feat: added check for empty body to throw error * chore: moved check to start of workflow to run first saving time
- Loading branch information
1 parent
f69d7b5
commit 61dde1e
Showing
2 changed files
with
49 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,10 @@ jobs: | |
deploy-preview: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- if: github.event.pull_request.body == '' | ||
run: | | ||
echo "::error::Pull request body text can't be empty, please define which collections to test" | ||
exit 1 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Pages | ||
|
@@ -27,14 +31,24 @@ jobs: | |
run: | | ||
pip install -U pip | ||
pip install -r generators/requirements.txt | ||
- name: Build | ||
- if: github.event.pull_request.body == 'all' | ||
name: Build all | ||
env: | ||
SH_INSTANCE_ID: ${{ secrets.SH_INSTANCE_ID }} | ||
SH_CLIENT_ID: ${{ secrets.SH_CLIENT_ID }} | ||
SH_CLIENT_SECRET: ${{ secrets.SH_CLIENT_SECRET }} | ||
run: | | ||
cd generators/ | ||
python generate_indicators.py | ||
- if: github.event.pull_request.body != 'all' | ||
name: Build only specified collections | ||
env: | ||
SH_INSTANCE_ID: ${{ secrets.SH_INSTANCE_ID }} | ||
SH_CLIENT_ID: ${{ secrets.SH_CLIENT_ID }} | ||
SH_CLIENT_SECRET: ${{ secrets.SH_CLIENT_SECRET }} | ||
run: | | ||
cd generators/ | ||
python generate_indicators.py -ni | ||
python generate_indicators.py -c ${{ github.event.pull_request.body }} | ||
# Upload build to S3 | ||
- name: sync client s3 | ||
uses: jakejarvis/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters