-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from NipunaRanasinghe/master
Fix PR build workflow
- Loading branch information
Showing
1 changed file
with
26 additions
and
24 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 |
---|---|---|
@@ -1,27 +1,29 @@ | ||
name: CI | ||
name: PR Build | ||
|
||
on: [pull_request] | ||
on: [ pull_request ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Ballerina Build | ||
uses: ballerina-platform/ballerina-action/@2201.1.1 | ||
with: | ||
args: | ||
pack | ||
- name: Ballerina Test | ||
uses: ballerina-platform/ballerina-action/@2201.1.1 | ||
with: | ||
args: | ||
test --test-report --code-coverage --coverage-format=xml | ||
env: | ||
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }} | ||
SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }} | ||
REGION: ${{ secrets.REGION }} | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set Up Ballerina | ||
uses: ballerina-platform/[email protected] | ||
with: | ||
version: latest | ||
- name: Ballerina Build | ||
run: bal pack | ||
- name: Set Up Ballerina | ||
uses: ballerina-platform/[email protected] | ||
with: | ||
version: latest | ||
- 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 --test-report --code-coverage --coverage-format=xml | ||
env: | ||
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }} | ||
SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }} | ||
REGION: ${{ secrets.REGION }} | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 |