Skip to content

Commit

Permalink
prep matrix for alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Feb 15, 2024
1 parent 37c42bf commit 87b6bdc
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,27 @@ jobs:

strategy:
matrix:
node-version: [14.x,16.x,18.x,19.x,20.x]
node-version: [14,16,18,19,20]
os: [
ubuntu-latest,
macos-12,
macos-14,
windows-latest
]
arch: ["amd64"]
alpine: [false]
include:
- os: "macos-14"
arch: "arm64"
- os: "ubuntu-latest"
arch: "arm64"
alpine: true
- os: "ubuntu-latest"
arch: "amd64"
alpine: true
exclude:
- os: "macos-14"
arch: "arm64"
node-version: 14
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -27,6 +41,18 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Set up QEMU
if: matrix.arch == 'arm64' && matrix.alpine == true
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
if: matrix.arch == 'arm64' && matrix.alpine == true
uses: docker/setup-buildx-action@v3
- run: script/ci/build-and-test.sh
if: matrix.arch != 'alpine'
shell: bash
env:
NODE_VERSION: ${{ matrix.node-version }}
- name: test alpine ${{ matrix.arch }} package
if: ${{ matrix.alpine == true }}
run: docker run --platform=linux/${{ matrix.arch }} -e NODE_VERSION=${{ matrix.node-version }} --rm -v $(pwd):/app node:${{ matrix.node-version }}-alpine /bin/sh -c 'apk add --no-cache bash && cd /app && ./script/ci/build-and-test.sh'

0 comments on commit 87b6bdc

Please sign in to comment.