Skip to content

Commit

Permalink
testing attach workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzhao committed Aug 25, 2023
1 parent bd46682 commit d3bd02b
Showing 1 changed file with 42 additions and 26 deletions.
68 changes: 42 additions & 26 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
node: electronjs/node@1.1.0
node: electronjs/node@1.4.1

commands:
install:
Expand All @@ -10,15 +10,23 @@ commands:
- node/install:
node-version: '18.15.0'
- checkout
run-fast-tests:
run-lint-and-build:
steps:
- node/install-packages
- run:
name: 'Lint and build Forge'
name: 'Lint codebase'
command: |
yarn lint
yarn syncpack
- run:
name: 'Build Electron Forge'
command: |
yarn build
run-fast-tests:
steps:
- node/install-packages
- attach_workspace:
at: .
- run:
name: 'Run fast tests'
command: |
Expand All @@ -27,19 +35,24 @@ commands:
run-slow-tests:
steps:
- node/install-packages
- run:
name: 'Lint and build Forge'
command: |
yarn lint
yarn syncpack
yarn build
- attach_workspace:
at: .
- run:
name: 'Run slow tests'
command: |
echo $(circleci tests glob "packages/**/*_spec_slow.ts")
circleci tests glob "packages/**/*_spec_slow.ts" | circleci tests split --split-by=timings | xargs yarn test
jobs:
lint-and-build:
executor: node/linux
steps:
- install
- run-lint-and-build
- persist_to_workspace:
root: .
paths: packages/**/dist

fast-tests:
parameters:
executor:
Expand Down Expand Up @@ -136,23 +149,26 @@ jobs:
workflows:
tests:
jobs:
- lint-and-build
- fast-tests:
requires:
- lint-and-build
matrix:
parameters:
executor: [node/windows, node/linux, node/macos]
arch: [x64, arm64]
exclude:
- executor: node/windows
arch: arm64
- executor: node/linux
arch: arm64
- slow-tests:
matrix:
parameters:
executor: [node/windows, node/linux, node/macos]
arch: [x64, arm64]
exclude:
- executor: node/windows
arch: arm64
- executor: node/linux
arch: arm64
executor: [node/linux]
arch: [x64]
# exclude:
# - executor: node/windows
# arch: arm64
# - executor: node/linux
# arch: arm64
# - slow-tests:
# matrix:
# parameters:
# executor: [node/windows, node/linux, node/macos]
# arch: [x64, arm64]
# exclude:
# - executor: node/windows
# arch: arm64
# - executor: node/linux
# arch: arm64

0 comments on commit d3bd02b

Please sign in to comment.