From 7fcc3377c9b3519de5f5c99f94093a57f8b8b640 Mon Sep 17 00:00:00 2001 From: Stefan Botez Date: Wed, 2 Dec 2020 16:52:27 +0000 Subject: [PATCH 1/2] Include GitHub action on push and pr --- .github/workflows/test-on-push-and-pr.yml | 20 +++++++++++++++++++ Makefile | 2 +- scripts/postinstall.sh | 5 ++--- .../codebuild-local/codebuild_build.sh | 2 +- 4 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/test-on-push-and-pr.yml diff --git a/.github/workflows/test-on-push-and-pr.yml b/.github/workflows/test-on-push-and-pr.yml new file mode 100644 index 0000000..bd5c9be --- /dev/null +++ b/.github/workflows/test-on-push-and-pr.yml @@ -0,0 +1,20 @@ +name: test-on-push-and-pr + +on: + push: + branches: [ main ] + pull_request: + branches: [ '*' ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up node + uses: actions/setup-node@v1 + with: + node-version: '12' + - name: Run 'pr' target + run: make pr diff --git a/Makefile b/Makefile index 743ea16..8a3222f 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ dev: init test # Verifications to run before sending a pull request .PHONY: pr -pr: dev test-smoke +pr: build dev test-smoke .PHONY: clean clean: diff --git a/scripts/postinstall.sh b/scripts/postinstall.sh index 573434e..0675146 100755 --- a/scripts/postinstall.sh +++ b/scripts/postinstall.sh @@ -20,7 +20,6 @@ if test "${current_path#*$node_modules_path}" != "$current_path" || [ "$BUILD" ! deps_path="$current_path/../deps" # Clean up source dependencies - rm -rf "$deps_path"/patches - rm -rf "$deps_path"/aws-lambda-cpp* - rm -rf "$deps_path"/curl* + rm -rf "$deps_path"/aws-lambda-cpp*[^gz]$ + rm -rf "$deps_path"/curl*[^gz]$ fi diff --git a/test/integration/codebuild-local/codebuild_build.sh b/test/integration/codebuild-local/codebuild_build.sh index 64af522..ffadfa3 100755 --- a/test/integration/codebuild-local/codebuild_build.sh +++ b/test/integration/codebuild-local/codebuild_build.sh @@ -95,7 +95,7 @@ then exit 1 fi -docker_command="docker run -it " +docker_command="docker run " if isOSWindows then docker_command+="-v //var/run/docker.sock:/var/run/docker.sock -e " From 240ec5e6678edac6e8af2493427d48aadbbb30fe Mon Sep 17 00:00:00 2001 From: Stefan Botez Date: Wed, 2 Dec 2020 18:27:14 +0000 Subject: [PATCH 2/2] Delete dependencies patches on clean up --- scripts/postinstall.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/postinstall.sh b/scripts/postinstall.sh index 0675146..6c4c9b4 100755 --- a/scripts/postinstall.sh +++ b/scripts/postinstall.sh @@ -20,6 +20,7 @@ if test "${current_path#*$node_modules_path}" != "$current_path" || [ "$BUILD" ! deps_path="$current_path/../deps" # Clean up source dependencies + rm -rf "$deps_path"/patches rm -rf "$deps_path"/aws-lambda-cpp*[^gz]$ rm -rf "$deps_path"/curl*[^gz]$ fi