Skip to content

Commit

Permalink
ci: use npm workspaces commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolg42 committed Apr 1, 2022
1 parent 600e8e1 commit f7a4681
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/3_LS_tests_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Dependencies in Language Server
run: cd packages/language-server && npm install
- name: Install Dependencies
run: npm install
- name: Build Language Server
run: cd packages/language-server && npm run build
run: npm run build --workspace @prisma/language-server
- name: Run Language Server tests
run: cd packages/language-server && npm test
run: npm run test --workspace @prisma/language-server

bump:
name: Bump Language Server version
Expand All @@ -61,12 +61,12 @@ jobs:
echo ${{github.event.inputs.extension_version}}
echo ${{github.event.inputs.branch}}
echo ${{github.event.inputs.trigger_reason}}
- name: Install Dependencies in Language Server
run: cd packages/language-server && npm install
- name: Install Dependencies
run: npm install
- name: Build Language Server
run: cd packages/language-server && npm run build
run: npm run build --workspace @prisma/language-server
- name: Publish Language Server to npm
run: cd packages/language-server && npm publish --tag ${{ github.event.inputs.npm_channel }} --access public
run: npm publish --workspace @prisma/language-server --tag ${{ github.event.inputs.npm_channel }} --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/6_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Replace Readme for marketplace
run: node scripts/change_readme.js ${{ github.event.inputs.npm_channel }}
- name: Build vsix
run: cd packages/vscode && npm run package
run: npm run package --workspace prisma-insider

# Create GitHub Release and upload built result as asset
- name: Get git tag and asset name
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,13 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
cache: 'npm'
- name: Install Dependencies
run: npm install
- name: Compile
- name: Build all packages
run: npm run compile
- name: Run Language Server tests
run: cd packages/language-server && npm test
run: npm run test --workspace @prisma/language-server
- name: Run VS Code extension tests in headless mode
uses: GabrielBB/[email protected]
with:
Expand Down

0 comments on commit f7a4681

Please sign in to comment.