Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch package manager to Yarn 3 and update CI jobs #341

Merged
merged 1 commit into from
Mar 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 37 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,48 @@ on:

jobs:
build:
name: Test Suite
name: Lint, Test, Build & Pack on Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16.x']

steps:
- name: Checkout code
- name: Checkout repo
uses: actions/checkout@v2

- name: Set up Node
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: 'npm'
node-version: ${{ matrix.node }}
cache: 'yarn'

- name: Install deps
run: npm ci --ignore-scripts
run: yarn install

# Read existing version, reuse that, add a Git short hash
# - name: Set build version to Git commit
# run: node scripts/writeGitVersion.js $(git rev-parse --short HEAD)

# - name: Check updated version
# run: jq .version package.json

- name: Run linter
run: npm run lint
run: yarn lint

- name: Run tests
run: npm test
run: yarn test

- name: Compile
run: npm run build
run: yarn build

- name: Pack
run: yarn pack

- uses: actions/upload-artifact@v2
with:
name: package
path: packages/toolkit/package.tgz

test-types:
name: Test Types with TypeScript ${{ matrix.ts }}
Expand All @@ -41,25 +59,26 @@ jobs:
strategy:
fail-fast: false
matrix:
ts: ['4.2', '4.3', '4.4', '4.5', '4.6', '4.7', '4.8', '4.9']
node: ['16.x']
ts: ['4.2', '4.3', '4.4', '4.5', '4.6', '4.7', '4.8', '4.9', '5.0']

steps:
- name: Checkout code
- name: Checkout repo
uses: actions/checkout@v2

- name: Set up Node
- name: Use node ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'npm'
node-version: ${{ matrix.node }}
cache: 'yarn'

- name: Install deps
run: npm ci --ignore-scripts
run: yarn install

- name: Install TypeScript ${{ matrix.ts }}
run: npm install typescript@${{ matrix.ts }} --ignore-scripts
run: yarn add typescript@${{ matrix.ts }}

- name: Test types
run: |
./node_modules/.bin/tsc --version
npm run test:typescript
yarn tsc --version
yarn test:typescript
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,17 @@ coverage
lib
dist
es
builds/
builds/


typesversions
.cache
.yarnrc
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
*.tgz
801 changes: 801 additions & 0 deletions .yarn/releases/yarn-3.2.4.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.2.4.cjs
Loading