1152 upgrade merge react sdk #344
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
#Build the application | |
name: Build without E2E tests | |
on: | |
pull_request: {} | |
push: | |
branches: [master] | |
workflow_dispatch: # for running action manually | |
env: | |
# These must be set for fetchdep.sh to get the right branch | |
REPOSITORY: ${{ github.repository }} | |
PR_NUMBER: ${{ github.event.pull_request.number }} | |
jobs: | |
build: | |
name: "Build" | |
runs-on: ubuntu-latest | |
# Only run on draft PRs. On ready_for_review PRs, we already have the Cypress job which runs the build | |
if: github.event.pull_request.draft == true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Node Version | |
id: node_version | |
run: echo ::set-output name=node_version::$(node -e 'console.log(require("./package.json").engines.node)') | |
- uses: actions/setup-node@v3 | |
with: | |
cache: "yarn" | |
node-version: ${{ steps.node_version.outputs.node_version }} | |
- name: Install Dependencies | |
run: "yarn install" | |
- name: "Copy the config file at the right place" | |
run: "cp config.dev.json config.json" # todo we could make the choice of backend configurable. | |
- name: Build | |
run: "yarn build" | |
- name: Upload build in artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: devbuild # because we used the dev config file | |
path: webapp | |
# We'll only use this in a triggered job, then we're done with it | |
retention-days: 1 |