refactor(ld-bg-cells): add mtrust cells #3739
Workflow file for this run
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: CI/CD | |
on: | |
push: | |
branches: | |
- main | |
- rc | |
pull_request: | |
jobs: | |
dependabot: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write | |
steps: | |
- uses: fastify/github-action-merge-dependabot@v3 | |
with: | |
merge-method: 'rebase' | |
target: 'minor' | |
github-token: ${{ github.token }} | |
test: | |
name: Test with Node v${{ matrix.node }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [20] | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Setup Node v${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache pnpm modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 8.10.1 | |
run_install: | | |
- recursive: true | |
args: [--frozen-lockfile] | |
# Docs must always be built to ensure the components.d.ts is generated | |
# inside the src folder; without it ts linting fails for docs files! | |
- name: Build | |
run: | | |
pnpm run build | |
pnpm run build:docs | |
env: | |
GH_TOKEN: ${{ github.token }} | |
MODE: gh_pages | |
- name: Lint source files | |
run: pnpm run lint | |
- name: Run unit tests | |
run: pnpm run test:unit | |
# e2e tests are still not stable due to flaky screenshot diffing in stencil | |
#- name: Run e2e tests | |
# if: github.event_name == 'pull_request' | |
# run: pnpm run test:e2e | |
- name: Archive bin_dist artifacts | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bin_dist | |
path: | | |
bin | |
dist | |
hydrate | |
retention-days: 1 | |
- name: Archive dist_docs artifacts | |
if: github.ref == 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist_docs | |
path: dist_docs | |
retention-days: 1 | |
- name: Coveralls | |
if: github.ref == 'refs/heads/main' | |
uses: coverallsapp/github-action@master | |
continue-on-error: true | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
document: | |
if: github.ref == 'refs/heads/main' | |
name: Deploy dist_docs to GitHub pages | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Download dist_docs artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist_docs | |
path: dist_docs | |
- name: Deploy docs | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: dist_docs | |
- name: Invalidate Cloudfront | |
uses: chetan/invalidate-cloudfront-action@v2 | |
env: | |
PATHS: '/*' | |
DISTRIBUTION: ${{ secrets.AWS_CF_DISTRIBUTION_ID }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: us-east-1 | |
release: | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' | |
name: npm publish / GitHub release | |
needs: test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [20] | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache pnpm modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 8.10.1 | |
run_install: | | |
- recursive: true | |
args: [--frozen-lockfile] | |
- name: Download bin_dist artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: bin_dist | |
path: ./ | |
- name: Semantic Release | |
if: success() | |
run: pnpm exec semantic-release --extends ./config/.releaserc.cjs | |
env: | |
GH_TOKEN: ${{ github.token }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |