From 0e1fcd86e67317c15906d6d128b5026acb86ac92 Mon Sep 17 00:00:00 2001 From: Nicholas Sylke Date: Wed, 16 Aug 2023 19:51:45 -0500 Subject: [PATCH 1/3] ci: setup build workflow --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 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..bf0251646 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: "Continuous Integration" + +on: + push: + branches: [ "feat/refresh" ] + pull_request: + branches: [ "feat/refresh" ] + +env: + HUSKY: 0 + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 2 + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Get npm cache directory + shell: bash + run: | + echo "CACHE_PATH=$(npm config get cache)" >> $GITHUB_ENV + - name: Setup npm cache + id: cache + uses: actions/cache@v3 + with: + path: ${{ env.CACHE_PATH }} + key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-npm-cache- + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: npm ci + - name: Build + run: npm run build --workspaces From 0a3040371981e9e51cc3f78fd61a03374fdcf23d Mon Sep 17 00:00:00 2001 From: Nicholas Sylke Date: Wed, 16 Aug 2023 20:00:13 -0500 Subject: [PATCH 2/3] ci: remove --workspaces from the build script in ci workflow --- .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 bf0251646..00d4fff2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,4 +38,4 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: npm ci - name: Build - run: npm run build --workspaces + run: npm run build From c571a3d0d95a42d5a63b2a6cf92b2bf570824b76 Mon Sep 17 00:00:00 2001 From: Nicholas Sylke Date: Thu, 17 Aug 2023 18:17:27 -0500 Subject: [PATCH 3/3] ci: use built-in cache from setup-node action --- .github/workflows/ci.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00d4fff2f..f8b8e97aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,20 +22,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18 - - name: Get npm cache directory - shell: bash - run: | - echo "CACHE_PATH=$(npm config get cache)" >> $GITHUB_ENV - - name: Setup npm cache - id: cache - uses: actions/cache@v3 - with: - path: ${{ env.CACHE_PATH }} - key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm-cache- + cache: npm - name: Install dependencies - if: steps.cache.outputs.cache-hit != 'true' run: npm ci - name: Build run: npm run build