Prepare for cookie banner #893
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: Sanity Build | |
on: [pull_request] | |
jobs: | |
sanity-build: | |
strategy: | |
fail-fast: false | |
matrix: | |
apps: [frontend, server] | |
name: ${{ matrix.apps }} Sanity Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
registry-url: https://npm.pkg.github.com/ | |
scope: "@navikt" | |
- name: Generate bunfig.toml | |
run: | | |
cd ${{ matrix.apps }} | |
echo -e "[install.scopes]\n\"@navikt\" = { token = \"${{ secrets.READER_TOKEN }}\", url = \"https://npm.pkg.github.com/\" }" > bunfig.toml | |
- name: Install ${{ matrix.apps }} dependencies | |
shell: bash | |
env: | |
BUN_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | |
run: | | |
cd ${{ matrix.apps }} | |
bun install --frozen-lockfile | |
- name: Restore caches for ${{ matrix.apps }} | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
${{matrix.apps}}/.tsbuildinfo | |
key: ${{ runner.os }}-${{ matrix.apps }}-${{ hashFiles(format('{0}/tsconfig.json', matrix.apps)) }} | |
- name: Typecheck ${{ matrix.apps }} | |
shell: bash | |
run: | | |
cd ${{ matrix.apps }} | |
bun run typecheck | |
- name: Lint ${{ matrix.apps }} | |
shell: bash | |
run: | | |
cd ${{ matrix.apps }} | |
bun run lint | |
- name: Test ${{ matrix.apps }} | |
shell: bash | |
run: | | |
cd ${{ matrix.apps }} | |
bun test | |
- name: Save caches for ${{ matrix.apps }} | |
uses: actions/cache/save@v3 | |
if: always() | |
with: | |
path: | | |
${{matrix.apps}}/.tsbuildinfo | |
key: ${{ runner.os }}-${{ matrix.apps }}-${{ hashFiles(format('{0}/tsconfig.json', matrix.apps)) }} |