Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(containers): sw-1792 remove travis #1206

Merged
merged 2 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
tags:
- "*"
pull_request:
branches: [ main, stable, stage, dev** ]
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.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Curiosity Frontend
[![Build Status](https://app.travis-ci.com/RedHatInsights/curiosity-frontend.svg?branch=main)](https://app.travis-ci.com/RedHatInsights/curiosity-frontend)
[![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
16 changes: 7 additions & 9 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

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}"
}