From 7eb1d891f357b750c9da43573b334bf77afd8a2e Mon Sep 17 00:00:00 2001 From: Ashleigh Simonelli Date: Mon, 4 Jan 2021 20:00:42 +0000 Subject: [PATCH 01/16] chore: testing actions --- .github/workflows/main.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..8b54dd7 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,39 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + test: + # The type of runner that the job will run on + runs-on: ubuntu-latest + env: + COMPOSE_FILE: .ci/docker-compose.yml + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: env sync + run: export .env.dist + + # Runs a single command using the runners shell + - name: build docker db + run: docker-compose up -d + + # Runs a set of commands using the runners shell + - name: tests + run: yarn test From c833775ba0f4c68440ddba6b959ebb8668b365bc Mon Sep 17 00:00:00 2001 From: Ashleigh Simonelli Date: Mon, 4 Jan 2021 20:02:09 +0000 Subject: [PATCH 02/16] fix: compose file location --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b54dd7..6670ea8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: # The type of runner that the job will run on runs-on: ubuntu-latest env: - COMPOSE_FILE: .ci/docker-compose.yml + COMPOSE_FILE: ./docker-compose.yml # Steps represent a sequence of tasks that will be executed as part of the job steps: From ef4a898e780062321d196fac79b944519e374fa8 Mon Sep 17 00:00:00 2001 From: Ashleigh Simonelli Date: Mon, 4 Jan 2021 20:03:08 +0000 Subject: [PATCH 03/16] fix: exporting envs from file --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6670ea8..88d92bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@v2 - name: env sync - run: export .env.dist + run: export $(cat ./.env.dist | xargs) # Runs a single command using the runners shell - name: build docker db From 244d9e8fb8b631864832e97019006e40542448d2 Mon Sep 17 00:00:00 2001 From: Ashleigh Simonelli Date: Mon, 4 Jan 2021 20:04:37 +0000 Subject: [PATCH 04/16] fix: cp env file --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88d92bd..f4794be 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@v2 - name: env sync - run: export $(cat ./.env.dist | xargs) + run: cp .env.dist .env && export $(cat ./.env | xargs) # Runs a single command using the runners shell - name: build docker db From 04b170f73595e528232f2a44f9d65b886216aeb0 Mon Sep 17 00:00:00 2001 From: Ashleigh Simonelli Date: Mon, 4 Jan 2021 20:06:38 +0000 Subject: [PATCH 05/16] fix: added install command --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f4794be..d6b0289 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,6 +33,9 @@ jobs: # Runs a single command using the runners shell - name: build docker db run: docker-compose up -d + + - name: install + run: yarn # Runs a set of commands using the runners shell - name: tests From 26cbfd309f7068cf350a36ecb7a38ceff1d9ec5c Mon Sep 17 00:00:00 2001 From: Ashleigh Simonelli Date: Mon, 4 Jan 2021 20:12:05 +0000 Subject: [PATCH 06/16] fix: change to npm i to prevent prepublish --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d6b0289..c98d20e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,7 +35,7 @@ jobs: run: docker-compose up -d - name: install - run: yarn + run: npm i # Runs a set of commands using the runners shell - name: tests From 3840ead6249959b817efef4d1ab87a6adb7adf16 Mon Sep 17 00:00:00 2001 From: Ashleigh Simonelli Date: Mon, 4 Jan 2021 20:14:22 +0000 Subject: [PATCH 07/16] fix: converted back to yarn can't use npm, no lock file --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c98d20e..0e0f03e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,7 +35,7 @@ jobs: run: docker-compose up -d - name: install - run: npm i + run: yarn install --ignore-scripts # Runs a set of commands using the runners shell - name: tests From ac27ac6460e6030ea5de3cf90d1fbf21ce873168 Mon Sep 17 00:00:00 2001 From: Ashleigh Simonelli Date: Mon, 4 Jan 2021 20:15:14 +0000 Subject: [PATCH 08/16] feat: added build script --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0e0f03e..0791e58 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,6 +36,9 @@ jobs: - name: install run: yarn install --ignore-scripts + + - name: build + run: yarn build # Runs a set of commands using the runners shell - name: tests From 3d9455de990b2aa7d057bb36162d420d8a657fb1 Mon Sep 17 00:00:00 2001 From: Ashleigh Simonelli Date: Mon, 4 Jan 2021 20:18:58 +0000 Subject: [PATCH 09/16] test --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0791e58..9dd11fe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,6 +33,9 @@ jobs: # Runs a single command using the runners shell - name: build docker db run: docker-compose up -d + + - name: check docker + run: docker-compose ps - name: install run: yarn install --ignore-scripts From 13aed2b1102def4d0a3351303aac1daf29b2ccec Mon Sep 17 00:00:00 2001 From: Aaryanna Simonelli Date: Mon, 4 Jan 2021 20:22:53 +0000 Subject: [PATCH 10/16] testing docker-compose --- .github/workflows/main.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9dd11fe..2fe0dec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,9 +33,6 @@ jobs: # Runs a single command using the runners shell - name: build docker db run: docker-compose up -d - - - name: check docker - run: docker-compose ps - name: install run: yarn install --ignore-scripts @@ -43,6 +40,12 @@ jobs: - name: build run: yarn build + - name: check docker + run: docker-compose ps + + - name: check again + run: docker-compose exec db mysql -u root + # Runs a set of commands using the runners shell - name: tests run: yarn test From a8ae9885da28ef5335b87db703922c27b2b5dd39 Mon Sep 17 00:00:00 2001 From: Ashleigh Simonelli Date: Mon, 4 Jan 2021 20:24:27 +0000 Subject: [PATCH 11/16] fix: tabbing... --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2fe0dec..b295612 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,7 +44,7 @@ jobs: run: docker-compose ps - name: check again - run: docker-compose exec db mysql -u root + run: docker-compose exec db mysql -u root # Runs a set of commands using the runners shell - name: tests From 0cc1c8a7f44bb78b9b6ac736b47e0088e1e5b20d Mon Sep 17 00:00:00 2001 From: Aaryanna Simonelli Date: Mon, 4 Jan 2021 20:25:46 +0000 Subject: [PATCH 12/16] feat: added badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c4448dd..2063b8d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # typeorm-polymorphic - + An extension package for polymorphic relationship management, declaration and repository queries for [typeorm](https://typeorm.io/) From 264740aeeabd6059ad1ad80a46c8154553eda1af Mon Sep 17 00:00:00 2001 From: Aaryanna Simonelli Date: Mon, 4 Jan 2021 20:27:03 +0000 Subject: [PATCH 13/16] fix: start docker again --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b295612..2f4b27b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: run: yarn build - name: check docker - run: docker-compose ps + run: docker-compose up -d - name: check again run: docker-compose exec db mysql -u root From 3a86ec8354e5c34c308801b4416d183cd5b50060 Mon Sep 17 00:00:00 2001 From: Aaryanna Simonelli Date: Mon, 4 Jan 2021 20:28:59 +0000 Subject: [PATCH 14/16] fix: remove docker exec --- .github/workflows/main.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2f4b27b..4ba0499 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,9 +40,6 @@ jobs: - name: build run: yarn build - - name: check docker - run: docker-compose up -d - - name: check again run: docker-compose exec db mysql -u root From 3451eaaf722c2cb6fc4e21188e59affc48731122 Mon Sep 17 00:00:00 2001 From: Aaryanna Simonelli Date: Mon, 4 Jan 2021 20:30:38 +0000 Subject: [PATCH 15/16] fix: removed the wrong docker command... --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ba0499..f18c4e8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,8 +40,8 @@ jobs: - name: build run: yarn build - - name: check again - run: docker-compose exec db mysql -u root + - name: check docker + run: docker-compose up -d # Runs a set of commands using the runners shell - name: tests From 6120c0fd5e95bd7901b7d56a307fdd5246ff0bcb Mon Sep 17 00:00:00 2001 From: Aaryanna Simonelli Date: Mon, 4 Jan 2021 20:34:23 +0000 Subject: [PATCH 16/16] chore: change workflow name --- .github/workflows/main.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f18c4e8..8de802a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,6 @@ # This is a basic workflow to help you get started with Actions -name: CI +name: Tests # Controls when the action will run. on: diff --git a/README.md b/README.md index 2063b8d..9b5e8dd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # typeorm-polymorphic - + An extension package for polymorphic relationship management, declaration and repository queries for [typeorm](https://typeorm.io/)