Skip to content

Commit

Permalink
ci: update
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Apr 11, 2023
1 parent ce80466 commit 3888d9b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Expand Up @@ -59,8 +59,9 @@ jobs:
with:
node-version: 10.x
cache: "yarn"
# Remove `devDependencies` from `package.json` to avoid `yarn install` compatibility error
- run: node -e "const content = require('./package.json');delete content.devDependencies;require('fs').writeFileSync('package.json', JSON.stringify(content, null, 2));"
- run: yarn install --production --frozen-lockfile
- run: yarn install --frozen-lockfile
unit:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -112,10 +113,13 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
# Install old `jest` version and ignore platform problem for legacy node versions
- run: yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0
if: matrix.node-version == '10.x' || matrix.node-version == '12.x'
- run: yarn --frozen-lockfile
- run: yarn --frozen-lockfile --ignore-engines
if: matrix.node-version == '10.x' || matrix.node-version == '12.x'
- run: yarn --frozen-lockfile
if: matrix.node-version != '10.x' && matrix.node-version != '12.x'
- run: yarn link --frozen-lockfile || true
- run: yarn link webpack --frozen-lockfile
- uses: actions/cache@v3
Expand Down
28 changes: 26 additions & 2 deletions azure-pipelines.yml
Expand Up @@ -27,7 +27,7 @@ jobs:
- script: |
set -e
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
yarn --frozen-lockfile --ignore-engines
yarn --frozen-lockfile
yarn link --frozen-lockfile || true
yarn link webpack --frozen-lockfile
displayName: "Install dependencies"
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- script: |
set -e
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
yarn --frozen-lockfile --ignore-engines
yarn --frozen-lockfile
yarn link --frozen-lockfile || true
yarn link webpack --frozen-lockfile
displayName: "Install dependencies"
Expand Down Expand Up @@ -141,11 +141,16 @@ jobs:
key: yarn | $(Agent.OS) | yarn.lock
path: $(YARN_CACHE_FOLDER)
displayName: "Cache Yarn packages"
# Install old `jest` version and ignore platform problem for legacy node versions
- script: yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0
displayName: "Install old jest version"
condition: or(eq(variables['node_version'], '^10.13.0'), eq(variables['node_version'], '^12.4.0'))
- script: yarn --frozen-lockfile --ignore-engines
displayName: "Install dependencies (old node.js version)"
condition: or(eq(variables['node_version'], '^10.13.0'), eq(variables['node_version'], '^12.4.0'))
- script: yarn --frozen-lockfile
displayName: "Install dependencies"
condition: and(not(eq(variables['node_version'], '^10.13.0')), not(eq(variables['node_version'], '^12.4.0')))
- script: yarn link --frozen-lockfile || true
displayName: "Link webpack"
continueOnError: true
Expand Down Expand Up @@ -210,6 +215,7 @@ jobs:
key: yarn | $(Agent.OS) | yarn.lock
path: $(YARN_CACHE_FOLDER)
displayName: "Cache Yarn packages"
# Install old `jest` version and ignore platform problem for legacy node versions
- script: yarn upgrade jest@^27.5.0 jest-circus@^27.5.0 jest-cli@^27.5.0 jest-diff@^27.5.0 jest-environment-node@^27.5.0 jest-junit@^13.0.0
displayName: "Install old jest version"
condition: or(eq(variables['node_version'], '^10.13.0'), eq(variables['node_version'], '^12.4.0'))
Expand All @@ -219,7 +225,16 @@ jobs:
yarn --frozen-lockfile --ignore-engines
yarn link --frozen-lockfile || true
yarn link webpack --frozen-lockfile
displayName: "Install dependencies (old node.js version)"
condition: or(eq(variables['node_version'], '^10.13.0'), eq(variables['node_version'], '^12.4.0'))
- script: |
set -e
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
yarn --frozen-lockfile
yarn link --frozen-lockfile || true
yarn link webpack --frozen-lockfile
displayName: "Install dependencies"
condition: and(not(eq(variables['node_version'], '^10.13.0')), not(eq(variables['node_version'], '^12.4.0')))
- script: |
set -e
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
Expand Down Expand Up @@ -284,7 +299,16 @@ jobs:
yarn --frozen-lockfile --ignore-engines
yarn link --frozen-lockfile || true
yarn link webpack --frozen-lockfile
displayName: "Install dependencies (old node.js version)"
condition: or(eq(variables['node_version'], '^10.13.0'), eq(variables['node_version'], '^12.4.0'))
- script: |
set -e
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
yarn --frozen-lockfile
yarn link --frozen-lockfile || true
yarn link webpack --frozen-lockfile
displayName: "Install dependencies"
condition: and(not(eq(variables['node_version'], '^10.13.0')), not(eq(variables['node_version'], '^12.4.0')))
- script: |
set -e
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
Expand Down

0 comments on commit 3888d9b

Please sign in to comment.