Skip to content

Daily build

Daily build #492

Workflow file for this run

name: Daily build
on:
schedule:
- cron: '30 2 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup Ballerina Environment
- name: Set Up Ballerina
uses: ballerina-platform/setup-ballerina@v1.1.0
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
run: bal test ./ballerina --test-report --code-coverage --coverage-format=xml
env:
JAVA_HOME: /usr/lib/jvm/default-jvm
REFRESH_URL: ${{ secrets.REFRESH_URL }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
USER_ID_1: ${{ secrets.USER_ID_1 }}
USER_ID_2: ${{ secrets.USER_ID_2 }}
USER_ID_3: ${{ secrets.USER_ID_3 }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
# Send notification when build fails
- name: Notify failure
if: ${{ failure() }}
run: |
curl -X POST \
'https://api.github.com/repos/ballerina-platform/ballerina-release/dispatches' \
-H 'Accept: application/vnd.github.v3+json' \
-H 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \
--data "{
\"event_type\": \"notify-build-failure\",
\"client_payload\": {
\"repoName\": \"module-ballerinax-microsoft.teams\"
}
}"