PR Check - Widget #930
Workflow file for this run
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
name: PR Check - Widget | |
on: | |
pull_request: | |
paths: | |
- "packages/connect-widget/**" | |
merge_group: | |
workflow_dispatch: | |
env: | |
dir: packages/connect-widget | |
jobs: | |
check-commits: | |
uses: ./.github/workflows/_check-commits.yml | |
secrets: inherit | |
# Not reusing _build.yml b/c Widget is not a npm workspace package any more, and differently than | |
# lambdas, it's install/build steps are not triggered by the root package.json | |
check-pr: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Log Environment | |
run: | | |
env | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18.14" | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Log Git Ref | |
run: | | |
echo "Git ref: $(git rev-parse HEAD)" | |
working-directory: ${{ env.dir }} | |
- name: Install | |
run: | | |
pwd | |
npm run install-deps | |
working-directory: ${{ env.dir }} | |
- name: Run Linter | |
run: npm run lint | |
working-directory: ${{ env.dir }} | |
- name: Build/compile for PRODUCTION | |
if: ${{ github.event.pull_request.base.ref == 'master' }} | |
run: | | |
pwd | |
npm run build:cloud | |
working-directory: ${{ env.dir }} | |
- name: Build/compile for STAGING | |
if: ${{ github.event.pull_request.base.ref != 'master' }} | |
run: | | |
pwd | |
npm run build:staging | |
working-directory: ${{ env.dir }} | |
- name: Run Tests | |
run: npm run test | |
working-directory: ${{ env.dir }} |