Skip to content

Commit

Permalink
fix: ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkXia committed May 9, 2024
1 parent 6f5e630 commit 65e1adc
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 4 deletions.
76 changes: 73 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ jobs:
- host: windows-latest
target: x86_64-pc-windows-msvc
node:
- '14'
- '16'
- '18'
runs-on: ${{ matrix.settings.host }}
Expand Down Expand Up @@ -175,7 +174,6 @@ jobs:
fail-fast: false
matrix:
node:
- '14'
- '16'
- '18'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -207,7 +205,6 @@ jobs:
fail-fast: false
matrix:
node:
- '14'
- '16'
- '18'
runs-on: ubuntu-latest
Expand All @@ -233,6 +230,79 @@ jobs:
shell: bash
- name: Test bindings
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine yarn test
test-linux-aarch64-gnu-binding:
name: Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
node:
- '16'
- '18'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-aarch64-unknown-linux-gnu
path: .
- name: List packages
run: ls -R .
shell: bash
- name: Install dependencies
run: |
yarn config set supportedArchitectures.cpu "arm64"
yarn config set supportedArchitectures.libc "glibc"
yarn install
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
image: node:${{ matrix.node }}-slim
options: '--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build'
run: |
set -e
yarn test
ls -la
test-linux-aarch64-musl-binding:
name: Test bindings on aarch64-unknown-linux-musl - node@lts
needs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: bindings-aarch64-unknown-linux-musl
path: .
- name: List packages
run: ls -R .
shell: bash
- name: Install dependencies
run: |
yarn config set supportedArchitectures.cpu "arm64"
yarn config set supportedArchitectures.libc "musl"
yarn install
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Setup and run tests
uses: addnab/docker-run-action@v3
with:
image: node:lts-alpine
options: '--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build'
run: |
set -e
yarn test
universal-macOS:
name: Build universal macOS binary
needs:
Expand Down
2 changes: 1 addition & 1 deletion __test__/index.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import test from 'ava'
import { getCssModulesLocalIdent } from '../index.js'

test('template [hash]', (t) => {
t.is(getCssModulesLocalIdent('src/pages/index.module.css', 'test' ,'[hash]'), '_58deea1c54f94c19c993');
t.is(getCssModulesLocalIdent('src/pages/index.module.css', 'test' ,'[hash]'), 'c25864290c9e89ea1553');
})
test('template [path][name][ext]__[local]', (t) => {
t.is(getCssModulesLocalIdent('src/pages/index.module.css', 'test' ,'[path][name][ext]__[local]'), 'src-pages-index-module-css__test');
Expand Down

0 comments on commit 65e1adc

Please sign in to comment.