APP-2072 Move prime to packages/legacy in a pnpm workspace. #216
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: Continuous integration and deployment | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install 🔧 | |
uses: ./.github/actions/setup | |
- name: Run lints and checks | |
run: pnpm -C packages/legacy check | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install 🔧 | |
uses: ./.github/actions/setup | |
- name: Build 🏗️ | |
run: pnpm -C packages/legacy build | |
- name: Upload npm artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: npm-dist | |
path: dist | |
- name: Upload GitHub Pages artifacts | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: packages/legacy/prime | |
test: | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install 🔧 | |
uses: ./.github/actions/setup | |
with: | |
node-version: 16 | |
- name: Install Playwright Browsers | |
run: pnpm -C packages/legacy playwright-install --with-deps | |
- name: Run Playwright tests | |
run: pnpm -C packages/legacy test | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: playwright-report | |
path: packages/legacy/playwright-report/ | |
retention-days: 30 | |
deploy-npm: | |
if: ${{ github.repository == 'viamrobotics/prime' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
needs: [check, build, test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Install Node.js' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Download npm artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: npm-dist | |
path: packages/legacy/dist | |
- name: Publish 🚀 | |
uses: JS-DevTools/npm-publish@541aa6b21b4a1e9990c95a92c21adc16b35e9551 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
deploy-pages: | |
if: ${{ github.repository == 'viamrobotics/prime' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
needs: [check, build, test] | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |