Skip to content

Commit

Permalink
Merge pull request #1 from isuruRuhu/handle-codeaction-failing-scenarios
Browse files Browse the repository at this point in the history
Handle codeaction failing scenarios
  • Loading branch information
isuruRuhu authored Mar 14, 2021
2 parents 12aaf8f + 93255ee commit 9b77ed8
Show file tree
Hide file tree
Showing 2,342 changed files with 150,467 additions and 37,504 deletions.
33 changes: 4 additions & 29 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,9 @@
codecov:
ci:
- travis
- !appveyor # ignore CI builds by AppVeyor
require_ci_to_pass: no

fixes:
- "ballerina/lang$0046*/*/::langlib/lang.*/src/main/ballerina/"

ignore:
- "compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/parser/antlr4" # ignore ANTLR4 generated sources
- "**/tests"

coverage:
status:
project:
default: off
integration:
flags: integrationtests
unittests:
target: 50%
flags: unittests

flags:
integrationtests:
paths:
- ./tests/ballerina-tools-integration-test
- ./tests/jballerina-integration-test
unittests:
paths:
- ./composer
- ./misc
- ./language-server
- ./tests/ballerina-spec-conformance-tests
- ./tests/ballerina-compiler-plugin-test
- ./tests/ballerina-unit-test
- ./bvm
- ./stdlib
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
---
name: "Bug Report"
about: "Report a bug if something is not working as expected"
labels: 'Type/Bug'

---

**Description:**
<!-- Give a brief description of the issue -->
<!-- Give a brief description of the bug -->

**Steps to reproduce:**

Expand Down
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/type_improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "Improvement Request"
about: "Create an improvement request for an existing feature"
labels: 'Type/Improvement'

---

**Description:**
<!-- Give a brief description of the improvement -->

**Describe your problem(s)**

**Describe your solution(s)**

**Related Issues (optional):**
<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. -->

**Suggested Labels (optional):**
<!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels-->

**Suggested Assignees (optional):**
<!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees-->
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/type_new_feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "New Feature Request"
about: "Create a new feature request"
labels: 'Type/NewFeature'

---

**Description:**
<!-- Give a brief description of the new feature -->

**Describe your problem(s)**

**Describe your solution(s)**

**Related Issues (optional):**
<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. -->

**Suggested Labels (optional):**
<!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels-->

**Suggested Assignees (optional):**
<!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees-->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/type_task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "Task"
about: "Create a task which you want to keep track"
labels: 'Type/Task'

---

**Description:**
<!-- Give a brief description of the task -->

**Describe your task(s)**

**Related Issues (optional):**
<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. -->

**Suggested Labels (optional):**
<!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels-->

**Suggested Assignees (optional):**
<!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees-->
6 changes: 6 additions & 0 deletions .github/workflows/CI_publish_snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ jobs:
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }}
run: |
./gradlew clean build -x createJavadoc --scan publish --continue --rerun-tasks
./gradlew createCodeCoverageReport
- name: Generate Codecov Report
uses: codecov/codecov-action@v1
with:
files: ./.jacoco/reports/jacoco/report.xml

- name: Trigger Standard Library Module Builds
run: |
Expand Down
100 changes: 10 additions & 90 deletions .github/workflows/CI_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
ubuntu_build:
name: Build without tests on Ubuntu
name: Build with all tests on Ubuntu
runs-on: ubuntu-latest
timeout-minutes: 75

Expand All @@ -37,95 +37,15 @@ jobs:
run: |
export DISPLAY=':99.0'
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
./gradlew build -x test --max-workers=2 --scan --no-daemon
find ~/.gradle/caches/ -name "*.lock" -type f -delete
./gradlew build --max-workers=2 --scan --no-daemon
find ~/.gradle/caches/ -name "*.lock" -type f -delete
run_integration_test:
name: Run integration tests
runs-on: ubuntu-latest
timeout-minutes: 75
needs: ubuntu_build

steps:
- uses: actions/checkout@v2

- name: Initialize sub-modules
run: git submodule update --init

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ github.sha }}
restore-keys: ${{ runner.os }}-gradle

- name: Run integration test
run: |
export DISPLAY=':99.0'
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
./gradlew :jballerina-integration-test:test --fail-fast --max-workers=1 --scan --no-daemon
run_jbal_long_running_test:
name: Run jbal & long running tests
runs-on: ubuntu-latest
timeout-minutes: 75
needs: ubuntu_build

steps:
- uses: actions/checkout@v2

- name: Initialize sub-modules
run: git submodule update --init

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ github.sha }}
restore-keys: ${{ runner.os }}-gradle

- name: Run jballerina unit test
run: |
export DISPLAY=':99.0'
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
./gradlew :jballerina-unit-test:test :testerina-integration-test:test --fail-fast -x createJavadoc --max-workers=1 --scan --no-daemon
run_unit_test:
name: Run all other unit tests
runs-on: ubuntu-latest
timeout-minutes: 75
needs: ubuntu_build

steps:
- uses: actions/checkout@v2

- name: Initialize sub-modules
run: git submodule update --init

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Generate Jacoco report
if: github.event_name == 'pull_request'
run: ./gradlew createCodeCoverageReport

- name: Cache Gradle packages
uses: actions/cache@v2
- name: Generate Codecov Report
if: github.event_name == 'pull_request'
uses: codecov/codecov-action@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ github.sha }}
restore-keys: ${{ runner.os }}-gradle

- name: Run all the other unit test
run: |
export DISPLAY=':99.0'
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
./gradlew build -x createJavadoc -x :jballerina-unit-test:test -x :jballerina-integration-test:test -x :testerina-integration-test:test --max-workers=1 --scan --no-daemon
files: ./.jacoco/reports/jacoco/report.xml
3 changes: 1 addition & 2 deletions .github/workflows/CI_ubuntu_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,4 @@ jobs:
restore-keys: ${{ runner.os }}-gradle

- name: Build with Gradle
run: ./gradlew.bat build --continue -x :ballerina-lang:test -x :jballerina-unit-test:test -x :jballerina-integration-test:test -x :jballerina-debugger-integration-test:test -x :ballerina-cli:test -x :ballerina-shell:shell-cli:test -x createJavadoc --stacktrace -scan --console=plain --no-daemon --no-parallel

run: ./gradlew.bat build --continue -x :jballerina-unit-test:test -x :jballerina-integration-test:test -x :jballerina-debugger-integration-test:test -x :ballerina-shell:shell-cli:test -x createJavadoc --stacktrace -scan --console=plain --no-daemon --no-parallel
99 changes: 9 additions & 90 deletions .github/workflows/daily_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
ubuntu_build:
name: Build without tests on Ubuntu
name: Build with tests on Ubuntu
runs-on: ubuntu-latest
timeout-minutes: 75

Expand All @@ -32,95 +32,14 @@ jobs:
run: |
export DISPLAY=':99.0'
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
./gradlew build -x createJavadoc -x test --max-workers=2 --scan --no-daemon
find ~/.gradle/caches/ -name "*.lock" -type f -delete
./gradlew build --max-workers=2 --scan --no-daemon
find ~/.gradle/caches/ -name "*.lock" -type f -delete
run_integration_test:
name: Run integration tests
runs-on: ubuntu-latest
timeout-minutes: 75
needs: ubuntu_build

steps:
- uses: actions/checkout@v2

- name: Initialize sub-modules
run: git submodule update --init

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ github.sha }}
restore-keys: ${{ runner.os }}-gradle

- name: Run integration test
run: |
export DISPLAY=':99.0'
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
./gradlew :jballerina-integration-test:test --fail-fast -x createJavadoc --max-workers=1 --scan --no-daemon
run_jbal_long_running_test:
name: Run jbal & long running tests
runs-on: ubuntu-latest
timeout-minutes: 75
needs: ubuntu_build

steps:
- uses: actions/checkout@v2

- name: Initialize sub-modules
run: git submodule update --init

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ github.sha }}
restore-keys: ${{ runner.os }}-gradle

- name: Run jballerina unit test
- name: Notify failure
if: ${{ failure() }}
run: |
export DISPLAY=':99.0'
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
./gradlew :jballerina-unit-test:test :testerina-integration-test:test --fail-fast -x createJavadoc --max-workers=1 --scan --no-daemon
run_unit_test:
name: Run all other unit tests
runs-on: ubuntu-latest
timeout-minutes: 75
needs: ubuntu_build

steps:
- uses: actions/checkout@v2
curl \
-X POST 'https://chat.googleapis.com/v1/spaces/${{secrets.BALLERINA_CHAT_ID}}/messages?key=${{secrets.BALLERINA_CHAT_KEY}}&token=${{secrets.BALLERINA_CHAT_TOKEN}}' \
--header 'Content-Type: application/json' \
-d '{"text": "*ballerina-lang daily build failure* \nPlease \n visit <https://github.com/ballerina-platform/ballerina-lang/actions?query=workflow%3A%22Daily+build%22|the daily build page> for more information"}'
- name: Initialize sub-modules
run: git submodule update --init

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ github.sha }}
restore-keys: ${{ runner.os }}-gradle

- name: Run all the other unit test
run: |
export DISPLAY=':99.0'
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
./gradlew build -x createJavadoc -x :jballerina-unit-test:test -x :jballerina-integration-test:test -x :testerina-integration-test:test --max-workers=1 --scan --no-daemon
3 changes: 1 addition & 2 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:
git config user.name ${{ secrets.BALLERINA_BOT_USERNAME }}
git config user.email ${{ secrets.BALLERINA_BOT_EMAIL }}
git checkout -b release-${VERSION}
./gradlew release -Prelease.useAutomaticVersion=true
./gradlew -Pversion=${VERSION} publish -x test
./gradlew build release publish -Prelease.useAutomaticVersion=true -Pversion=${VERSION} --continue
- name: Create Github release from the release tag
run: |
curl --request POST 'https://api.github.com/repos/ballerina-platform/ballerina-lang/releases' \
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/stale_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Close stale pull requests'

on:
schedule:
- cron: '30 19 * * *'
workflow_dispatch:

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
stale-pr-message: 'This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the `stale` label is removed or commented.'
close-pr-message: 'Closed PR due to inactivity for more than 18 days.'
days-before-pr-stale: 15
days-before-pr-close: 3
days-before-issue-stale: -1
days-before-issue-close: -1
Loading

0 comments on commit 9b77ed8

Please sign in to comment.