Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ShogunPanda committed Jan 13, 2025
1 parent 44a93bb commit fe1be92
Showing 1 changed file with 8 additions and 72 deletions.
80 changes: 8 additions & 72 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ permissions:
contents: read

jobs:
build:
name: Build Native and WebAssembly
ci:
name: CI
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -29,25 +29,25 @@ jobs:
# Scoop modifies the PATH so we make the modified PATH global.
echo $env:PATH >> $env:GITHUB_PATH
- name: Use supported Node.js Version
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.18.0

- name: Fetch code
- name: Setup Docker
uses: docker/setup-buildx-action@v1

- name: Fetch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1

# Skip macOS & Windows, cache there is slower
- name: Restore node_modules cache for Linux
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
if: runner.os == 'Linux'
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install dependencies
run: npm ci
Expand All @@ -60,72 +60,8 @@ jobs:
- name: Build WebAssembly
run: npm run build-wasm

test:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
steps:
- name: Install clang for Windows
if: runner.os == 'Windows'
run: |
iwr -useb get.scoop.sh -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin
scoop install llvm --global
# Scoop modifies the PATH so we make the modified PATH global.
echo $env:PATH >> $env:GITHUB_PATH
- name: Use supported Node.js Version
uses: actions/setup-node@v3
with:
node-version: 20.18.0

- name: Fetch code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1

# Skip macOS & Windows, cache there is slower
- name: Restore node_modules cache for Linux
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
if: runner.os == 'Linux'
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci

# Custom script, because progress looks not good in CI
- name: Run tests
run: npm run test

lint:
name: Run ESLint
runs-on: ubuntu-latest
steps:
- name: Fetch code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1

- name: Restore node_modules cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci --ignore-scripts

- name: Run lint command
- name: Lint Code
run: npm run lint

0 comments on commit fe1be92

Please sign in to comment.