Skip to content

Commit

Permalink
build(travis): sw-1792 removed, favor container build (#1206)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Oct 4, 2023
1 parent 60cab49 commit 5089db0
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 184 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build
on:
push:
branches: [ main, stable, stage, dev** ]
tags:
- "*"
pull_request:
env:
COV_NODE_VERSION: 18
BRANCH: ${{ github.base_ref }}

jobs:
Integration-checks:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Node.js modules cache
uses: actions/cache@v3
id: modules-cache
with:
path: ${{ github.workspace }}/node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-modules
- name: Install Node.js packages
if: ${{ steps.modules-cache.outputs.cache-hit != 'true' }}
run: yarn install
- name: Lint and test
run: yarn test
- name: Code coverage
if: ${{ success() && contains(matrix.node-version, env.COV_NODE_VERSION) }}
uses: codecov/codecov-action@v3.1.4
- name: Confirm preview integration
if: ${{ success() }}
run: yarn build
env:
BETA: true
- name: Confirm stable integration
if: ${{ success() }}
run: yarn build
70 changes: 0 additions & 70 deletions .github/workflows/pull_request.yml

This file was deleted.

36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

67 changes: 0 additions & 67 deletions .travis/custom_release.sh

This file was deleted.

Binary file removed .travis/deploy_key.enc
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Curiosity Frontend
[![Build Status](https://app.travis-ci.com/RedHatInsights/curiosity-frontend.svg?branch=main)](https://app.travis-ci.com/RedHatInsights/curiosity-frontend)
[![Build](https://github.com/RedHatInsights/curiosity-frontend/actions/workflows/integration.yml/badge.svg?branch=main)](https://github.com/RedHatInsights/curiosity-frontend/actions/workflows/integration.yml)
[![codecov](https://codecov.io/gh/RedHatInsights/curiosity-frontend/branch/main/graph/badge.svg)](https://codecov.io/gh/RedHatInsights/curiosity-frontend)
[![License](https://img.shields.io/github/license/RedHatInsights/curiosity-frontend.svg)](https://github.com/RedHatInsights/curiosity-frontend/blob/main/LICENSE)

Expand Down
18 changes: 8 additions & 10 deletions scripts/pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,22 @@
deployPaths()
{
local DEPLOY_BRANCH=$1
local DEPLOY_BUILD_STAGE=$2
local CONTAINER_BUILD_ENV=$3
local CONTAINER_BUILD_ENV=$2

DEPLOY_PATH_PREFIX=""
DEPLOY_STAGE="Stable"

# Note: allow Container build, fallback to Travis build
# Note: allow Container build
if [[ $CONTAINER_BUILD_ENV == "true" ]]; then
DEPLOY_STAGE="Preview"
DEPLOY_PATH_PREFIX=/preview
DEPLOY_PATH_LINK_PREFIX=/preview
elif [[ $DEPLOY_BUILD_STAGE == *"Beta"* ]]; then
DEPLOY_PATH_PREFIX=/beta
DEPLOY_PATH_LINK_PREFIX=/preview
fi

echo UI_DEPLOY_PATH_PREFIX="$DEPLOY_PATH_PREFIX" >> ./.env.production.local
echo UI_DEPLOY_PATH_LINK_PREFIX="$DEPLOY_PATH_LINK_PREFIX" >> ./.env.production.local

echo "\"${DEPLOY_BUILD_STAGE}\" build stage config for branch \"${DEPLOY_BRANCH}\"..."
echo "\"${DEPLOY_STAGE}\" build stage config for branch \"${DEPLOY_BRANCH}\"..."
printf "Deploy path prefix ... ${GREEN}UI_DEPLOY_PATH_PREFIX=$DEPLOY_PATH_PREFIX${NOCOLOR}\n"
}
#
Expand Down Expand Up @@ -62,8 +60,8 @@ clean()
clean
version

# Note: See .travis.yml globals, GitHub actions, and Container Build environment variables
# - Travis, GitHub actions: BRANCH, BUILD_STAGE
# Note: See GitHub actions, and Container Build environment variables
# - GitHub actions: BRANCH, BETA
# - Container Build: BETA
deployPaths "${BRANCH:-local}" "${BUILD_STAGE:-Local Deploy}" "${BETA:-local env}"
deployPaths "${BRANCH:-local}" "${BETA:-local env}"
}

0 comments on commit 5089db0

Please sign in to comment.