-
Notifications
You must be signed in to change notification settings - Fork 15
37 lines (31 loc) · 1.19 KB
/
pull-request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Pull Request
on: [ pull_request ]
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
# 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
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
SENDER_EMAIL: ${{ secrets.SENDER_EMAIL }}
RECEIVER_EMAIL: ${{ secrets.RECEIVER_EMAIL }}
EMAIL_IDENTITY: ${{ secrets.EMAIL_IDENTITY }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3