Skip to content

Commit

Permalink
Merge branch 'main' into 17-replace-glowing-background-redis-svg-with…
Browse files Browse the repository at this point in the history
…-non-glowing-background-svg
  • Loading branch information
tylers-username committed Sep 22, 2023
2 parents 4228a63 + a213260 commit 152c81b
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 10 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Node.js CI

on:
pull_request:
branches:
- main

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- run: |
export CI=true
npm install cross-env npm-run-all -g
npm install
npm run test
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@platformsh/demo-project",
"version": "1.0.0",
"description": "A guided tour of Platform.sh features and CLI",
"description": "A guided tour of Upsun features and CLI",
"main": "index.js",
"scripts": {
"clean:backend": "cd backend && ./scripts/clean.sh",
Expand All @@ -15,7 +15,8 @@
"postinstall": "cross-env FORCE_COLOR=1 npm-run-all -l postinstall:*",
"postinstall:backend": "cd backend && ./scripts/build.sh",
"postinstall:frontend": "cd frontend && npm install",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "cross-env FORCE_COLOR=1 npm-run-all -l test:*",
"test:frontend": "cd frontend && npm run test"
},
"repository": {
"type": "git",
Expand Down
22 changes: 14 additions & 8 deletions utils/setup_platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

DOWNLOAD_LINK="https://docs.platform.sh/administration/cli.html"

if ! command -v platform &> /dev/null; then
printf "
if [ -z ${CI+x} ]; then
echo "CI is unset";
if ! command -v platform &> /dev/null; then
printf "
Requirement - platform: Not found
Expand All @@ -14,12 +16,12 @@ The Platform.sh CLI was not found, and is required to build this project locally
Visit $DOWNLOAD_LINK to download, then try again.
"
exit 1
else
RECOMMENDED_VERSION=$(npm pkg get 'otherDependencies.platform' | tr -d '\"')
CURRENT_VERSION=$(platform -V)
CURRENT_VERSION=${CURRENT_VERSION:16}
printf "
exit 1
else
RECOMMENDED_VERSION=$(npm pkg get 'otherDependencies.platform' | tr -d '\"')
CURRENT_VERSION=$(platform -V)
CURRENT_VERSION=${CURRENT_VERSION:16}
printf "
Requirement - platform: Installed
* Installed: $CURRENT_VERSION
Expand All @@ -30,4 +32,8 @@ to update.
$DOWNLOAD_LINK
"
fi

else
echo "CI is set to '$CI'";
fi

0 comments on commit 152c81b

Please sign in to comment.