mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-04 05:08:42 +08:00
3f94ed42b1
* chore: win test ci * chore: test on windows * fix: on * test: windows-2022 * ci: test * fix: update yarn.lock * ci: test * fix: yarn --verbose * fix: network-timeout * fix: ci * fix: vitest * fix: dirname * fix: test error * fix: test error * fix: test error * fix: skip win32 * fix: ci * fix: retry=2
74 lines
2.1 KiB
YAML
74 lines
2.1 KiB
YAML
name: Test on Windows
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'package.json'
|
|
- '**/yarn.lock'
|
|
- 'packages/core/acl/**'
|
|
- 'packages/core/actions/**'
|
|
- 'packages/core/database/**'
|
|
- 'packages/core/resourcer/**'
|
|
- 'packages/core/data-source-manager/**'
|
|
- 'packages/core/server/**'
|
|
- 'packages/core/utils/**'
|
|
- 'packages/plugins/**/src/server/**'
|
|
- '.github/workflows/nocobase-test-windows.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'package.json'
|
|
- '**/yarn.lock'
|
|
- 'packages/core/acl/**'
|
|
- 'packages/core/actions/**'
|
|
- 'packages/core/database/**'
|
|
- 'packages/core/resourcer/**'
|
|
- 'packages/core/data-source-manager/**'
|
|
- 'packages/core/server/**'
|
|
- 'packages/core/utils/**'
|
|
- 'packages/plugins/**/src/server/**'
|
|
- '.github/workflows/nocobase-test-windows.yml'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-2022
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
|
|
- run: yarn config set network-timeout 600000 -g
|
|
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- uses: actions/cache@v3
|
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Install project dependencies
|
|
run: yarn --prefer-offline
|
|
|
|
- name: Test with Sqlite
|
|
run: yarn test --server --single-thread=false
|
|
env:
|
|
LOGGER_LEVEL: error
|
|
DB_DIALECT: sqlite
|
|
DB_STORAGE: /tmp/db.sqlite
|
|
DB_TEST_PREFIX: test_
|
|
DB_UNDERSCORED: ${{ matrix.underscored }}
|