Skip to content

Commit

Permalink
Experimental Pipeline Changs: Remove PR deploy, replace with npm build.
Browse files Browse the repository at this point in the history
  • Loading branch information
NickPhura committed Jun 28, 2023
1 parent 80ff67d commit 18458a3
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 5 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# PR Build
# Builds the PR
name: PR Build

on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true

jobs:
# Print variables for logging and debugging purposes
checkEnv:
name: Print Env variables
runs-on: ubuntu-latest
timeout-minutes: 20
if: ${{ github.event.pull_request.merged == false }}
steps:
- name: Print Env Vars
run: |
echo OC CLI Version: $(oc version)
echo Git Base Ref: ${{ github.base_ref }}
echo Git Change ID: ${{ github.event.number }}
echo Git Pull Request Ref: ${{ github.event.pull_request.head.sha }}
echo Git Event Name: ${{ github.event_name }}
echo Git Event Action: ${{ github.event.action }}
echo Git Branch Ref: ${{ github.head_ref }}
echo PR in Draft: ${{ github.event.pull_request.draft }}
# Build the APP
buildAPP:
name: Build APP Image
runs-on: ubuntu-latest
timeout-minutes: 20
if: ${{ github.event.pull_request.merged == false }}
env:
PR_NUMBER: ${{ github.event.number }}
APP_NAME: "biohub-platform-app"
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 14

- name: Checkout Target Branch
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Install node modules
working-directory: app
run: npm ci

- name: Run build
working-directory: app
run: npm run build --if-present

# Build the API
buildAPI:
name: Build API Image
runs-on: ubuntu-latest
timeout-minutes: 20
if: ${{ github.event.pull_request.merged == false }}
env:
PR_NUMBER: ${{ github.event.number }}
APP_NAME: "biohub-platform-api"
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 14

- name: Checkout Target Branch
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Install node modules
working-directory: api
run: npm ci

- name: Run build
working-directory: api
run: npm run build --if-present
File renamed without changes.
6 changes: 3 additions & 3 deletions .github/workflows/lint-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Install api dependencies
working-directory: api
run: npm install
run: npm ci

- name: Run api linter
working-directory: api
Expand All @@ -105,7 +105,7 @@ jobs:
- name: Install app dependencies
working-directory: app
run: npm install
run: npm ci

- name: Run app linter
working-directory: app
Expand All @@ -129,7 +129,7 @@ jobs:
- name: Install database dependencies
working-directory: database
run: npm install
run: npm ci

- name: Run database linter
working-directory: database
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Install api dependencies
working-directory: api
run: npm install
run: npm ci

- name: Run api tests with coverage
working-directory: api
Expand All @@ -110,7 +110,7 @@ jobs:
- name: Install app dependencies
working-directory: app
run: npm install
run: npm ci

- name: Run app tests with coverage
working-directory: app
Expand Down

0 comments on commit 18458a3

Please sign in to comment.