refactor: panda v2 #16081
This file contains hidden or 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 | |
| on: [push, pull_request] | |
| env: | |
| CI_RELEASE_ROLE: ${{ secrets.CI_RELEASE_ROLE }} | |
| DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
| DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | |
| NDLA_RELEASES: ${{ secrets.NDLA_RELEASES }} | |
| GH_TOKEN: ${{ secrets.CI_NOW_GH_TOKEN }} | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| GH_PR_NUMBER: ${{ github.event.number }} | |
| GH_PR_REPO: ${{ github.event.pull_request.head.repo.full_name }} | |
| GH_PR_SHA: ${{ github.event.pull_request.head.sha }} | |
| jobs: | |
| unit_tests: | |
| name: "Unit tests" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: jdx/mise-action@v3 | |
| - name: "Enable corepack" | |
| run: corepack enable | |
| - name: Get Yarn and npm cache directory paths | |
| id: yarn-npm-cache-path | |
| run: | | |
| echo "yarn=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
| echo "npm=$(npm config get cache)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ${{ steps.yarn-npm-cache-path.outputs.yarn }} | |
| ${{ steps.yarn-npm-cache-path.outputs.npm }} | |
| .eslintcache | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn- | |
| - name: "Install" | |
| run: yarn install --immutable | |
| - name: "Bootstrap" | |
| run: yarn bootstrap:ci | |
| - name: "Check-all" | |
| run: yarn check-all | |
| - name: "Deploy to vercel" | |
| continue-on-error: true | |
| if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) || (github.event_name == 'push' && github.ref == 'refs/heads/master') | |
| uses: ndlano/reusable-workflows/.github/actions/vercel-deploy@main | |
| with: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| MASTER_ALIAS: "designmanual.ndla.no" | |
| REPO_NAME: "frontend-packages" |