Skip to content

Commit

Permalink
Merge pull request #84 from NipunaRanasinghe/master
Browse files Browse the repository at this point in the history
Fix PR build workflow
  • Loading branch information
NipunaRanasinghe authored Jul 19, 2023
2 parents 03bacef + 75b6bc2 commit 50606c0
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions .github/workflows/pull-request.yml
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

0 comments on commit 50606c0

Please sign in to comment.