noahdarveau/Rollup changes for treeshaking #7802
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Microsoft Teams Library JS CI | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events against main | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/[email protected] | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: pnpm/action-setup@v3 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 9.0.6 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build TeamsJS | |
run: pnpm build | |
- name: Run Unit Tests | |
run: pnpm test | |
- name: Check for lint errors | |
run: pnpm lint | |
- name: Upload Unit Test Results | |
if: always() | |
uses: actions/[email protected] | |
with: | |
name: Unit Test Results (Jest ${{ matrix.node-version }}) | |
path: packages/*/test-results/unit/unit-tests-report.xml | |
publish-test-results: | |
name: 'Publish Unit Tests Results' | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
pull-requests: write | |
if: always() | |
steps: | |
- name: Download Artifacts | |
uses: actions/[email protected] | |
with: | |
path: artifacts | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
files: artifacts/**/*.xml | |
comment_mode: off |