-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to use Ballerina gradle plugin and centralized workflows
Update test file
- Loading branch information
1 parent
1094271
commit 2440a4b
Showing
27 changed files
with
911 additions
and
361 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# Linux start script should use lf | ||
/gradlew text eol=lf | ||
|
||
# These are Windows script files and should use crlf | ||
*.bat text eol=crlf | ||
|
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Purpose | ||
|
||
Fixes: | ||
|
||
## Examples | ||
|
||
## Checklist | ||
- [ ] Linked to an issue | ||
- [ ] Updated the specification | ||
- [ ] Updated the changelog | ||
- [ ] Added tests | ||
- [ ] Checked native-image compatibility |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: GraalVM Check | ||
|
||
on: | ||
schedule: | ||
- cron: "30 18 * * *" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
call_stdlib_workflow: | ||
name: Run StdLib Workflow | ||
if: ${{ github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'ballerina-platform') }} | ||
uses: ballerina-platform/ballerina-standard-library/.github/workflows/build-with-bal-test-graalvm-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
additional-build-flags: "-x :googleapis.gmail-examples:build" |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,64 +1,18 @@ | ||
name: CI | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- 2201.[0-9]+.x | ||
repository_dispatch: | ||
types: | ||
check_connector_for_breaking_changes | ||
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 | ||
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 }} | ||
WORKBOOK_PATH: ${{ secrets.WORKBOOK_PATH }} | ||
|
||
- 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-microsoft.excel", | ||
"workflow": "CI" | ||
} | ||
}' | ||
call_workflow: | ||
name: Run Connector Build Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-standard-library/.github/workflows/build-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
repo-name: module-ballerinax-microsoft.excel |
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 |
---|---|---|
|
@@ -2,58 +2,13 @@ name: Daily build | |
|
||
on: | ||
schedule: | ||
- cron: '30 2 * * *' | ||
- cron: "30 2 * * *" | ||
|
||
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 | ||
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 }} | ||
WORKBOOK_PATH: ${{ secrets.WORKBOOK_PATH }} | ||
|
||
- 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.excel\" | ||
} | ||
}" | ||
call_workflow: | ||
name: Run Daily Build Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-standard-library/.github/workflows/daily-build-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
repo-name: module-ballerinax-microsoft.excel |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Publish to the Ballerina Dev\Stage Central | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
type: choice | ||
description: Select Environment | ||
required: true | ||
options: | ||
- DEV CENTRAL | ||
- STAGE CENTRAL | ||
|
||
jobs: | ||
call_workflow: | ||
name: Run Dev\Stage Central Publish Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-standard-library/.github/workflows/dev-stage-central-publish-connector-template.yml@main | ||
secrets: inherit | ||
with: | ||
environment: ${{ github.event.inputs.environment }} | ||
additional-publish-flags: "-x :microsoft.excel-examples:build" |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,43 +1,14 @@ | ||
name: Pull Request | ||
name: PR Build | ||
|
||
on: [ pull_request ] | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
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 | ||
on: pull_request | ||
|
||
# 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 | ||
# tests will be skipped if the PR is from a forked repository (as the secrets are not available) | ||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | ||
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 }} | ||
WORKBOOK_PATH: ${{ secrets.WORKBOOK_PATH }} | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
jobs: | ||
call_workflow: | ||
name: Run PR Build Workflow | ||
if: ${{ github.repository_owner == 'ballerina-platform' }} | ||
uses: ballerina-platform/ballerina-standard-library/.github/workflows/pr-build-connector-template.yml@main | ||
secrets: inherit |
Oops, something went wrong.