From 3d8cfc399cfa699949ab307adaaef6ca1bb8781d Mon Sep 17 00:00:00 2001 From: Vivaan Verma Date: Sat, 15 Oct 2022 17:21:28 +0100 Subject: [PATCH 1/6] add ci.yml --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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..50e140767 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: Build + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + env: + FORCE_COLOR: '1' + TOOL_NODE_FLAGS: --max_old_space_size=4096 + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + - name: Install dependencies + run: node common/scripts/install-run-rush.js install + - name: Build + run: | + rm -rf dist + node build-scripts build + - name: Checks + run: node build-scripts pre-deploy + - name: Upload build + uses: actions/upload-artifact@v3 + with: + path: dist + From 3c5547e1fe3f989a45975f4c4e476af8aad82918 Mon Sep 17 00:00:00 2001 From: Vivaan Verma Date: Sat, 15 Oct 2022 20:43:58 +0100 Subject: [PATCH 2/6] cache dependencies in action --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50e140767..978329070 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,14 +15,23 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + cache: pnpm + - name: Install dependencies run: node common/scripts/install-run-rush.js install + - name: Build run: | rm -rf dist node build-scripts build + - name: Checks run: node build-scripts pre-deploy + - name: Upload build uses: actions/upload-artifact@v3 with: From 69214ba0b838d5dd0e8987376db7249127258d12 Mon Sep 17 00:00:00 2001 From: Vivaan Verma Date: Sat, 15 Oct 2022 20:52:12 +0100 Subject: [PATCH 3/6] update ci --- .github/workflows/ci.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 978329070..32ab1e829 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,8 +18,21 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + + - name: Get pnpm store directory + id: pnpm-cache + run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - name: Setup pnpm cache + uses: actions/cache@v3 with: - cache: pnpm + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies run: node common/scripts/install-run-rush.js install @@ -35,5 +48,6 @@ jobs: - name: Upload build uses: actions/upload-artifact@v3 with: + name: bemuse-build-${{ github.sha }} path: dist From c7c072a43c6ec999cecbade24e9fbb62729e2510 Mon Sep 17 00:00:00 2001 From: Vivaan Verma Date: Sat, 15 Oct 2022 20:54:19 +0100 Subject: [PATCH 4/6] fix pnpm cache --- .github/workflows/ci.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32ab1e829..61756ed14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,21 +18,11 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 - - - name: Setup pnpm - uses: pnpm/action-setup@v2 - - - name: Get pnpm store directory - id: pnpm-cache - run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - - name: Setup pnpm cache - uses: actions/cache@v3 + + - name: Rush Install + uses: advancedcsg-open/actions-rush@v1 with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + build: true - name: Install dependencies run: node common/scripts/install-run-rush.js install From 5198fc174dce48f67685986e4d592f7a3df16d8d Mon Sep 17 00:00:00 2001 From: Vivaan Verma Date: Sat, 15 Oct 2022 20:55:39 +0100 Subject: [PATCH 5/6] remove dep caching --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61756ed14..c60c46f2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,11 +18,6 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 - - - name: Rush Install - uses: advancedcsg-open/actions-rush@v1 - with: - build: true - name: Install dependencies run: node common/scripts/install-run-rush.js install From 9501155821728d16d53895b5163192d3484132b5 Mon Sep 17 00:00:00 2001 From: Vivaan Verma Date: Sat, 15 Oct 2022 20:58:26 +0100 Subject: [PATCH 6/6] run ci on all pushes --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c60c46f2c..6fc4090a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,9 @@ on: push: branches: - master + pull_request: + branches: + - master workflow_dispatch: jobs: