Skip to content

Commit

Permalink
wip: migration from Travis CI to GitHub Actions #149
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-greffe committed Dec 9, 2023
1 parent 86f4a4f commit ed26702
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ chmod +x ./.github/workflows/env.sh
echo "##[group]Build"

# Define the application name
cd $APP
yarn pwa:build
EXIT_CODE=$?
check_code $EXIT_CODE 0 "Builing the client"
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/env.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash

check_code()
{
if [[ $1 -ne $2 ]]; then
echo "$3 has failed [error: $1]"
exit 1
fi
}

parse_semver()
{
local REGEXP="^([0-9]+)\.([0-9]+)\.([0-9]+)"
Expand Down Expand Up @@ -70,7 +78,14 @@ fi

# Clone the project and install the dependencies
node . $APP.js --clone
check_code $? 0 "Cloning $APP and its dependencies"

node . $APP.js --install
check_code $? 0 "Installing $APP and its dependencies"

node . $APP.js --link
check_code $? 0 "Linking $APP with its dependencies"

cd $APP

echo "##[endgroup]"
5 changes: 2 additions & 3 deletions .github/workflows/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ chmod +x ./.github/workflows/env.sh
#
# Run backend tests
#
cd api
yarn
yarn test

yarn test:server

0 comments on commit ed26702

Please sign in to comment.