Update dependency @types/node to v16.18.122 #1114
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
env: | |
NODE_VERSION: 14.18.1 | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v2 | |
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 Dependencies | |
run: yarn --pure-lockfile | |
- name: Lint Code | |
run: yarn lint | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v2 | |
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 Dependencies | |
run: yarn | |
- name: Run Unit Tests | |
run: yarn nx run-many --target=test --all --parallel | |
integration-test: | |
needs: | |
- unit-test | |
- lint | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-latest | |
# - ubuntu-latest TODO Why still timeouts? | |
# - windows-latest TODO Why still timeouts? | |
rxjs: | |
- '6.6.7' # Last 6.x | |
- '7.0.1' # Latest 7.0.x | |
- '7.2.0' # First Release that changed how operators are imported https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md#720-2021-07-05 | |
- 'latest' # Latest and greatest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v2 | |
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: Use RxJS ${{ matrix.rxjs }} for Test | |
run: | | |
sed -i '' 's/\"rxjs\": \".*\"/\"rxjs\": \"${{ matrix.rxjs }}\"/' packages/*/package.json | |
- name: Install Dependencies | |
run: yarn | |
- name: Test on Linux System | |
if: runner.os == 'Linux' | |
run: xvfb-run -a yarn nx run extension-integrationtest:integrationtest --configuration=test | |
- name: Test on Non-Linux System | |
if: runner.os != 'Linux' | |
run: yarn nx run extension-integrationtest:integrationtest --configuration=test | |
snapshot: | |
if: github.event_name != 'release' || (github.event_name == 'release' && github.event.release.prerelease == true) | |
needs: | |
- unit-test | |
- integration-test | |
- lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v2 | |
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 Dependencies | |
run: yarn --pure-lockfile | |
- name: Production Build | |
run: yarn nx run-many --target=build --configuration=prod --projects=extension,runtime-webpack | |
env: | |
POSTHOG_HOST: snapshot | |
POSTHOG_PROJECT_API_KEY: snapshot | |
- name: 'extension: Create VSIX' | |
run: yarn nx package extension | |
env: | |
VSCE_PAT: ${{ secrets.AZURE_ACCESS_TOKEN }} | |
- name: 'runtime-wepack: Create TGZ' | |
run: yarn nx package runtime-webpack | |
- name: 'extension: Upload snapshot artifact' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: extension | |
path: 'packages/extension/*.vsix' | |
retention-days: 10 | |
- name: 'runtime-webpack: Upload snapshot artifact' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: runtime-webpack | |
path: 'packages/runtime-webpack/*.tgz' | |
retention-days: 10 | |
publish-marketplace: | |
if: github.event_name == 'release' && github.event.release.prerelease == false | |
needs: | |
- unit-test | |
- lint | |
- integration-test | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: https://marketplace.visualstudio.com/items?itemName=manuelalabor.rxjs-debugging-for-vs-code | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install Dependencies | |
run: yarn --pure-lockfile | |
- name: Create Production Build | |
run: yarn nx run extension:build:prod | |
env: | |
POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }} | |
POSTHOG_PROJECT_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY }} | |
- name: 'Publish to Marketplace' | |
run: yarn nx run extension:publish | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
publish-npm: | |
if: github.event_name == 'release' | |
needs: | |
- unit-test | |
- lint | |
- integration-test | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: https://www.npmjs.com/package/@rxjs-debugging/runtime-webpack | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install Dependencies | |
run: yarn --pure-lockfile | |
- name: Create Production Build | |
run: yarn nx run runtime-webpack:build:prod | |
- name: 'Publish to npm' | |
run: yarn nx run runtime-webpack:publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |