From a8dc69103308e419abdb7a867eb2c9a9c9727be7 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 30 Sep 2019 13:51:38 +0100 Subject: [PATCH 1/7] Try using github actions Gonna monch this commit once i know it works --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 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 00000000..6861528a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: Test + +on: [push] + +jobs: + test: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Setup + run: | + npm i + npm i -g grunt + export NODE_OPTIONS=--max_old_space_size=2048 + - name: Lint + run: grunt lint + - name: Unit Tests + run: | + grunt test + grunt testnodeconsumer + - name: UI Tests + run: xvfb-run --server-args="-screen 0 1200x800x24" grunt testui + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Setup + run: | + npm i + npm i -g grunt + export NODE_OPTIONS=--max_old_space_size=2048 + - name: Build & Deploy + uses: JamesIves/github-pages-deploy-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: build/prod + BUILD_SCRIPT: grunt prod From 85906cafbb9422af3a544347cc918c38b047798d Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 30 Sep 2019 13:56:26 +0100 Subject: [PATCH 2/7] Adjustment --- .github/workflows/main.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6861528a..d971756d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Test +name: Test & Deploy on: [push] @@ -12,29 +12,19 @@ jobs: - name: Setup run: | npm i - npm i -g grunt export NODE_OPTIONS=--max_old_space_size=2048 - name: Lint - run: grunt lint + run: npx grunt lint - name: Unit Tests run: | - grunt test - grunt testnodeconsumer + npx grunt test + npx grunt testnodeconsumer - name: UI Tests - run: xvfb-run --server-args="-screen 0 1200x800x24" grunt testui - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Setup - run: | - npm i - npm i -g grunt - export NODE_OPTIONS=--max_old_space_size=2048 + run: xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui - name: Build & Deploy uses: JamesIves/github-pages-deploy-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages FOLDER: build/prod - BUILD_SCRIPT: grunt prod + BUILD_SCRIPT: npx grunt prod From 4e0d97f2c1dfed634d680b08e8d39d42030e1605 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 30 Sep 2019 14:02:22 +0100 Subject: [PATCH 3/7] Added sudo --- .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 d971756d..6d012505 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: - name: Unit Tests run: | npx grunt test - npx grunt testnodeconsumer + sudo npx grunt testnodeconsumer - name: UI Tests run: xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui - name: Build & Deploy From 4c737475d4ec5ae1de7812659a21cbbb5ea81d80 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 30 Sep 2019 14:08:23 +0100 Subject: [PATCH 4/7] Forgot to run prod build --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6d012505..3dae7b2d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,12 +19,13 @@ jobs: run: | npx grunt test sudo npx grunt testnodeconsumer + - name: Production Build + run: npx grunt prod - name: UI Tests run: xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui - - name: Build & Deploy + - name: Deploy uses: JamesIves/github-pages-deploy-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages FOLDER: build/prod - BUILD_SCRIPT: npx grunt prod From 123a0ccd700335d68912d180474e696d2a94e691 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 30 Sep 2019 14:41:14 +0100 Subject: [PATCH 5/7] Changed pages workflow --- .github/workflows/main.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3dae7b2d..ed0e59a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,9 @@ name: Test & Deploy -on: [push] +on: + push: + branches: + - master jobs: test: @@ -8,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@master - name: Setup run: | npm i @@ -24,8 +27,8 @@ jobs: - name: UI Tests run: xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui - name: Deploy - uses: JamesIves/github-pages-deploy-action@master + uses: peaceiris/actions-gh-pages@v2.4.0 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: build/prod + PERSONAL_TOKEN: ${{ secrets.ACCESS_TOKEN }} + PUBLISH_BRANCH: gh-pages + PUBLISH_DIR: ./build/prod From 0b5ee7c79fd54b1b60ad155fad954fad14f98319 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 4 Jul 2020 15:35:49 +0100 Subject: [PATCH 6/7] Update actions --- .github/workflows/main.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ed0e59a8..ac9856f1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: Setup run: | npm i @@ -27,8 +27,15 @@ jobs: - name: UI Tests run: xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui - name: Deploy - uses: peaceiris/actions-gh-pages@v2.4.0 - env: - PERSONAL_TOKEN: ${{ secrets.ACCESS_TOKEN }} - PUBLISH_BRANCH: gh-pages - PUBLISH_DIR: ./build/prod + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build/prod + # Once NPM_AUTH_TOKEN set up in repo, uncomment this + #- name: Deploy to NPM + # run: | + # npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN + # npm publish || true + # env: + # Add NPM publish token to the repo secrets + # NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} From 612937885464f6d62e2c46bdb45e8a0b53e707ed Mon Sep 17 00:00:00 2001 From: n1474335 Date: Fri, 22 Jan 2021 14:33:35 +0000 Subject: [PATCH 7/7] Reduced Actions script to just linting and testing --- .github/workflows/main.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ac9856f1..1a0e8a0e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,17 +20,17 @@ jobs: run: npx grunt lint - name: Unit Tests run: | - npx grunt test + npm test sudo npx grunt testnodeconsumer - - name: Production Build - run: npx grunt prod - - name: UI Tests - run: xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./build/prod + # - name: Production Build + # run: npx grunt prod + # - name: UI Tests + # run: xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui + # - name: Deploy + # uses: peaceiris/actions-gh-pages@v3 + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # publish_dir: ./build/prod # Once NPM_AUTH_TOKEN set up in repo, uncomment this #- name: Deploy to NPM # run: |