check_connector_for_breaking_changes #660
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- 2201.[0-9]+.x | |
repository_dispatch: | |
types: | |
check_connector_for_breaking_changes | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# Setup Ballerina Environment | |
- name: Set Up Ballerina | |
uses: ballerina-platform/[email protected] | |
with: | |
version: latest | |
# Build Ballerina Project | |
- name: Ballerina Build | |
run: bal pack ./ballerina | |
env: | |
JAVA_HOME: /usr/lib/jvm/default-jvm | |
# Build Module Examples | |
- name: Ballerina Examples Build | |
run: chmod +x ./examples/build.sh && ./examples/build.sh build | |
env: | |
JAVA_HOME: /usr/lib/jvm/default-jvm | |
# Test Ballerina Project | |
- name: Ballerina Test | |
working-directory: ./ballerina | |
run: bal test --test-report --code-coverage --coverage-format=xml | |
env: | |
CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }} | |
JAVA_HOME: /usr/lib/jvm/default-jvm | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
# Send notification when build fails | |
- name: Alert notifier on failure | |
if: failure() && (github.event.action == 'check_connector_for_breaking_changes') | |
run: | | |
curl -X POST \ | |
'https://api.github.com/repos/ballerina-platform/ballerina-release/dispatches' \ | |
--header 'Accept: application/vnd.github.v3+json' \ | |
--header 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \ | |
--data-raw '{ | |
"event_type": "notify-ballerinax-connector-build-failure", | |
"client_payload": { | |
"repoName": "module-ballerinax-googleapis.people", | |
"workflow": "CI" | |
} | |
}' |