From c5978d514289d829afa265ea61ab057a62198286 Mon Sep 17 00:00:00 2001 From: ryanformio Date: Wed, 1 May 2024 13:33:18 -0500 Subject: [PATCH 1/3] Will run all jobs against 18 and 20 --- .github/workflows/repo.yml | 87 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 .github/workflows/repo.yml diff --git a/.github/workflows/repo.yml b/.github/workflows/repo.yml new file mode 100644 index 00000000..93c28b51 --- /dev/null +++ b/.github/workflows/repo.yml @@ -0,0 +1,87 @@ +name: Build & Test + +on: push + +jobs: + setup: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] + steps: + - run: echo "Triggered by ${{ github.event_name }} event." + + - name: Check out repository code ${{ github.repository }} on ${{ github.ref }} + uses: actions/checkout@v3 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Cache node modules + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Installing dependencies + if: steps.cache.outputs.cache-hit != 'true' + uses: borales/actions-yarn@v4 + with: + cmd: install --frozen-lockfile + + build: + needs: setup + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] + steps: + - name: Check out repository code ${{ github.repository }} on ${{ github.ref }} + uses: actions/checkout@v3 + + - name: Restore node modules from cache + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Build + uses: borales/actions-yarn@v4 + with: + cmd: build + + test: + needs: setup + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] + steps: + - name: Check out repository code ${{ github.repository }} on ${{ github.ref }} + uses: actions/checkout@v3 + + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Restore node modules from cache + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Test + uses: borales/actions-yarn@v4 + with: + cmd: test \ No newline at end of file From 67086a0af5f740edd3023b37288ace88319d7fa0 Mon Sep 17 00:00:00 2001 From: ryanformio Date: Wed, 1 May 2024 13:40:07 -0500 Subject: [PATCH 2/3] removes repo.yml, and updates ci.yml --- .github/workflows/ci.yml | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2b0b447..caf72cbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,22 +4,22 @@ on: pull_request: types: [opened, synchronize] -env: - NODE_VERSION: 20.x - jobs: setup: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] steps: - run: echo "Triggered by ${{ github.event_name }} event." - name: Check out repository code ${{ github.repository }} on ${{ github.ref }} uses: actions/checkout@v3 - - name: Set up Node.js ${{ env.NODE_VERSION }} + - name: Set up Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: - node-version: ${{ env.NODE_VERSION }} + node-version: ${{ matrix.node-version }} cache: 'npm' - name: Cache node modules @@ -39,10 +39,19 @@ jobs: build: needs: setup runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] steps: - name: Check out repository code ${{ github.repository }} on ${{ github.ref }} uses: actions/checkout@v3 + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Restore node modules from cache uses: actions/cache@v3 with: @@ -59,10 +68,19 @@ jobs: test-current: needs: setup runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] steps: - name: Check out repository code ${{ github.repository }} on ${{ github.ref }} uses: actions/checkout@v3 + - name: Set up Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Restore node modules from cache uses: actions/cache@v3 with: @@ -79,6 +97,9 @@ jobs: test-target: needs: setup runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] steps: - name: Check out repository code ${{ github.repository }} on ${{ github.ref }} uses: actions/checkout@v3 @@ -105,10 +126,10 @@ jobs: echo "Merge successful." fi - - name: Set up Node.js ${{ env.NODE_VERSION }} + - name: Set up Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: - node-version: ${{ env.NODE_VERSION }} + node-version: ${{ matrix.node-version }} cache: 'npm' - name: Restore node modules from cache @@ -141,10 +162,10 @@ jobs: run: | echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc - - name: Set up Node.js ${{ env.NODE_VERSION }} + - name: Set up Node.js 20.x uses: actions/setup-node@v3 with: - node-version: ${{ env.NODE_VERSION }} + node-version: 20.x cache: 'npm' registry-url: 'https://registry.npmjs.org/' From 292ec41cbc5046c8038046b5b576725f0f38c19e Mon Sep 17 00:00:00 2001 From: ryanformio Date: Wed, 1 May 2024 13:45:52 -0500 Subject: [PATCH 3/3] Doesn't look like remove repo.yml was commited --- .github/workflows/repo.yml | 87 -------------------------------------- 1 file changed, 87 deletions(-) delete mode 100644 .github/workflows/repo.yml diff --git a/.github/workflows/repo.yml b/.github/workflows/repo.yml deleted file mode 100644 index 93c28b51..00000000 --- a/.github/workflows/repo.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: Build & Test - -on: push - -jobs: - setup: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x, 20.x] - steps: - - run: echo "Triggered by ${{ github.event_name }} event." - - - name: Check out repository code ${{ github.repository }} on ${{ github.ref }} - uses: actions/checkout@v3 - - - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - - name: Cache node modules - uses: actions/cache@v3 - with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-node- - - - name: Installing dependencies - if: steps.cache.outputs.cache-hit != 'true' - uses: borales/actions-yarn@v4 - with: - cmd: install --frozen-lockfile - - build: - needs: setup - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x, 20.x] - steps: - - name: Check out repository code ${{ github.repository }} on ${{ github.ref }} - uses: actions/checkout@v3 - - - name: Restore node modules from cache - uses: actions/cache@v3 - with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-node- - - - name: Build - uses: borales/actions-yarn@v4 - with: - cmd: build - - test: - needs: setup - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x, 20.x] - steps: - - name: Check out repository code ${{ github.repository }} on ${{ github.ref }} - uses: actions/checkout@v3 - - - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - - name: Restore node modules from cache - uses: actions/cache@v3 - with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-node- - - - name: Test - uses: borales/actions-yarn@v4 - with: - cmd: test \ No newline at end of file