From 8642b3aa3129aef28765b8c839ee50582d669b73 Mon Sep 17 00:00:00 2001 From: Vandy Liu <33995460+vandyliu@users.noreply.github.com> Date: Thu, 5 Mar 2020 11:54:44 -0800 Subject: [PATCH 01/13] Created first ci yaml --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..d08e38b57 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +# This workflow will do a clean install of node dependencies, python dependencies, build the source code and run tests + +name: CI + +on: + push: + branches: [ dev, staging ] + pull_request: + branches: [ dev, staging ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} and install npm dependencies + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - name: Setup Python environment + uses: actions/setup-python@v1.1.1 + with: + python-version: 3.x + - run: | + python -m pip install --upgrade pip + pip install -r ./src/requirements.txt + - name: Run npm compile, format-check and test + - with: + node-version: ${{ matrix.node-version }} + - run: npm run compile + - run: npm run check + - run: npm test From 386938b400d60b57e297b863704877cdca63ff07 Mon Sep 17 00:00:00 2001 From: Vandy Liu <33995460+vandyliu@users.noreply.github.com> Date: Thu, 5 Mar 2020 11:56:15 -0800 Subject: [PATCH 02/13] Removed - from with to make it part of the step --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d08e38b57..b41fc9707 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: python -m pip install --upgrade pip pip install -r ./src/requirements.txt - name: Run npm compile, format-check and test - - with: + with: node-version: ${{ matrix.node-version }} - run: npm run compile - run: npm run check From 050766df405c0d87af2967be14ee7940e3b5bf0a Mon Sep 17 00:00:00 2001 From: Vandy Liu <33995460+vandyliu@users.noreply.github.com> Date: Thu, 5 Mar 2020 11:59:14 -0800 Subject: [PATCH 03/13] made all steps include uses or run --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b41fc9707..11b107f39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,7 @@ jobs: python -m pip install --upgrade pip pip install -r ./src/requirements.txt - name: Run npm compile, format-check and test + uses: actions/setup-python@v1.1.1 with: node-version: ${{ matrix.node-version }} - run: npm run compile From f6b9417f1ecd1e0a1df511f6541358e6f15a7c1c Mon Sep 17 00:00:00 2001 From: Vandy Liu <33995460+vandyliu@users.noreply.github.com> Date: Thu, 5 Mar 2020 12:09:02 -0800 Subject: [PATCH 04/13] changed setup-python to setup-node --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11b107f39..6f4f89993 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: python -m pip install --upgrade pip pip install -r ./src/requirements.txt - name: Run npm compile, format-check and test - uses: actions/setup-python@v1.1.1 + uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - run: npm run compile From 92c5b59a03dc03287c1f9990ca68234ece31c6ab Mon Sep 17 00:00:00 2001 From: Vandy Liu <33995460+vandyliu@users.noreply.github.com> Date: Thu, 5 Mar 2020 12:14:32 -0800 Subject: [PATCH 05/13] More OS --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f4f89993..714c53f80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: [macos-latest, windows-latest, ubuntu-18.04] strategy: matrix: From ccaa2066bc34faecb2e4b73bef14cf28045eeb51 Mon Sep 17 00:00:00 2001 From: Vandy Liu <33995460+vandyliu@users.noreply.github.com> Date: Thu, 5 Mar 2020 12:16:59 -0800 Subject: [PATCH 06/13] fixed os --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 714c53f80..c4233b071 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,11 @@ on: jobs: build: - runs-on: [macos-latest, windows-latest, ubuntu-18.04] + runs-on: ${{ matrix.os }} strategy: matrix: + os: [macos-latest, windows-latest, ubuntu-18.04] node-version: [10.x] steps: From eed9cc4eeafb53004a0c4c6b68b76c1ae557a4b5 Mon Sep 17 00:00:00 2001 From: Vandy Liu <33995460+vandyliu@users.noreply.github.com> Date: Thu, 5 Mar 2020 12:26:36 -0800 Subject: [PATCH 07/13] fail fast false --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4233b071..9730b1cd7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [macos-latest, windows-latest, ubuntu-18.04] node-version: [10.x] From ee34371fcb5506bc1df12f1528ad6d190aa63c1c Mon Sep 17 00:00:00 2001 From: Vandy Liu <33995460+vandyliu@users.noreply.github.com> Date: Thu, 5 Mar 2020 15:35:28 -0800 Subject: [PATCH 08/13] Testing to see if linux will now display vs code --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9730b1cd7..98e935fa5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,10 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Enable GUI applications if on Linux + if: matrix.os == "ubuntu-18.04" + run: | + export DISPLAY="127.0.0.1:10.0" - name: Use Node.js ${{ matrix.node-version }} and install npm dependencies uses: actions/setup-node@v1 with: @@ -33,7 +37,7 @@ jobs: - run: | python -m pip install --upgrade pip pip install -r ./src/requirements.txt - - name: Run npm compile, format-check and test + - name: Use npm to compile, format-check and test uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} From b606e81a628d4cf0335f49944181daa73ae82cfb Mon Sep 17 00:00:00 2001 From: Vandy Liu <33995460+vandyliu@users.noreply.github.com> Date: Thu, 5 Mar 2020 15:46:43 -0800 Subject: [PATCH 09/13] Created better if statement for linux tests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98e935fa5..adcb0f0c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Enable GUI applications if on Linux - if: matrix.os == "ubuntu-18.04" + if: startsWith(matrix.os, 'ubuntu') run: | export DISPLAY="127.0.0.1:10.0" - name: Use Node.js ${{ matrix.node-version }} and install npm dependencies From 3a400f91b36f82f455e20eed9ea91020570c9045 Mon Sep 17 00:00:00 2001 From: Vandy Liu <33995460+vandyliu@users.noreply.github.com> Date: Thu, 5 Mar 2020 15:58:20 -0800 Subject: [PATCH 10/13] Testing xvfb-action on linux --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adcb0f0c0..544a7489a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Enable GUI applications if on Linux - if: startsWith(matrix.os, 'ubuntu') - run: | - export DISPLAY="127.0.0.1:10.0" - name: Use Node.js ${{ matrix.node-version }} and install npm dependencies uses: actions/setup-node@v1 with: @@ -43,4 +39,7 @@ jobs: node-version: ${{ matrix.node-version }} - run: npm run compile - run: npm run check - - run: npm test + - name: Run tests + uses: GabrielBB/xvfb-action@v1.0 + with: + run: npm test From e430b8bee2a2b82349208ed0b25740cc74816b90 Mon Sep 17 00:00:00 2001 From: Vandy Liu <33995460+vandyliu@users.noreply.github.com> Date: Thu, 5 Mar 2020 15:58:42 -0800 Subject: [PATCH 11/13] Fixed spelling error --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 544a7489a..c778af7db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,4 +42,4 @@ jobs: - name: Run tests uses: GabrielBB/xvfb-action@v1.0 with: - run: npm test + run: npm run test From 36409a10f82d31e4f1e5bdb30e03a7344ddc229b Mon Sep 17 00:00:00 2001 From: Vandy Liu <33995460+vandyliu@users.noreply.github.com> Date: Fri, 6 Mar 2020 13:50:59 -0800 Subject: [PATCH 12/13] Changed to dev-requirements.txt --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c778af7db..99bd8c27d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: python-version: 3.x - run: | python -m pip install --upgrade pip - pip install -r ./src/requirements.txt + pip install -r ./src/dev-requirements.txt - name: Use npm to compile, format-check and test uses: actions/setup-node@v1 with: From 0a73543de7169296fc2797efa3a1b2f982c368dd Mon Sep 17 00:00:00 2001 From: Vandy Liu <33995460+vandyliu@users.noreply.github.com> Date: Mon, 9 Mar 2020 16:56:04 -0700 Subject: [PATCH 13/13] change some names --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99bd8c27d..8a989c2d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: branches: [ dev, staging ] jobs: - build: + build-and-test: runs-on: ${{ matrix.os }}