-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[E4E-30]: Add Github actions for PRs
- Loading branch information
Showing
4 changed files
with
87 additions
and
0 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,12 @@ | ||
# Apply label "staging" | ||
staging: | ||
base: "staging" | ||
|
||
# Apply label "dev" | ||
dev: | ||
base: "development" | ||
|
||
# Apply whatever comes after release/ as the label | ||
# E.g. Merging into 'release/1.0' will add the label '1.0' | ||
$1: | ||
baseRegExp: "release[/](.*)" |
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,14 @@ | ||
name: PR Branch Labeler | ||
|
||
on: | ||
pull_request: | ||
types: [opened] | ||
|
||
jobs: | ||
label_prs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Label PRs | ||
uses: TheCleric/pr-branch-labeler@v3 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" |
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,14 @@ | ||
name: Auto approval for sync PRs without conflicts | ||
on: | ||
pull_request: | ||
types: [opened] | ||
jobs: | ||
approve_syncs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Approve sync PRs | ||
uses: nrccua/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
label-list: sync | ||
label-exclusion-list: conflicts,had conflicts,merge issues |
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,47 @@ | ||
name: Node Test for PRs | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- development | ||
- staging | ||
- "release/*" | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Install dependencies, test, and deploy a PR build | ||
runs-on: ubuntu-latest | ||
env: | ||
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET }}-pr-${{ github.event.number }} | ||
strategy: | ||
matrix: | ||
node: ["14"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
~/.npm | ||
**/node_modules | ||
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-test-${{ env.cache-name }}- | ||
${{ runner.os }}-test- | ||
${{ runner.os }}- | ||
- run: npm i | ||
- run: npm run test | ||
- name: Build | ||
run: npm run build | ||
- uses: romeovs/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
lcov-file: ./build/reports/jest/lcov.info |