-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(actions): 1.18.x release branch needs ci workflow definition. (#…
- Loading branch information
Matt Duftler
committed
Feb 12, 2020
1 parent
b05520b
commit 893e09d
Showing
2 changed files
with
162 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
name: Deck CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- release-* | ||
|
||
env: | ||
NODE_VERSION: 10.15.1 | ||
|
||
jobs: | ||
ci: | ||
name: Deck CI | ||
needs: [test, build, packages] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo test, build, packages successful | ||
|
||
test: | ||
name: Unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Ensure package bumps are pure | ||
id: purebump | ||
run: app/scripts/modules/assert_package_bumps_standalone.sh | ||
|
||
- uses: actions/setup-node@v1 | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Get yarn cache | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v1 | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Dependencies | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Unit Tests | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
run: yarn test --single-run | ||
|
||
build: | ||
name: Production Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Ensure package bumps are pure | ||
id: purebump | ||
run: app/scripts/modules/assert_package_bumps_standalone.sh | ||
|
||
- uses: actions/setup-node@v1 | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Get yarn cache | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v1 | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Dependencies | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Yarn Build | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
run: yarn build | ||
|
||
packages: | ||
name: Build Packages | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
packages: | ||
['core amazon docker titus', 'appengine azure cloudfoundry', 'ecs oracle', 'google huaweicloud kubernetes'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Ensure package bumps are pure | ||
id: purebump | ||
run: app/scripts/modules/assert_package_bumps_standalone.sh | ||
|
||
- uses: actions/setup-node@v1 | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Get yarn cache | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v1 | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Dependencies | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Build NPM Packages | ||
if: steps.purebump.outputs.ispurebump != 'true' | ||
run: app/scripts/modules/build_modules.sh ${{ matrix.packages }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
beginGroup() { | ||
if [[ -n "$GITHUB_ACTIONS" ]] ; then | ||
echo "::group::$*" | ||
elif [[ -n "$TRAVIS" ]] ; then | ||
echo "travis_fold:start:$*" | ||
echo "::endgroup::" | ||
fi | ||
} | ||
|
||
endGroup() { | ||
if [[ -n "$GITHUB_ACTIONS" ]] ; then | ||
echo "::endgroup::" | ||
elif [[ -n "$TRAVIS" ]] ; then | ||
echo "travis_fold:end:$*" | ||
fi | ||
} | ||
|
||
cd "$(dirname "$0")" || exit $? | ||
BUILD_ORDER=$(./build_order.sh $*) | ||
[[ $? -eq 0 ]] || exit $? | ||
|
||
for PACKAGE in $BUILD_ORDER ; do | ||
beginGroup "$PACKAGE" | ||
pushd "$PACKAGE" || exit $? | ||
yarn lib || exit 255 | ||
endGroup "$PACKAGE" | ||
popd || exit $? | ||
done |