Skip to content

feat(day06): bazel + vite + github action to deploy a static page #14

feat(day06): bazel + vite + github action to deploy a static page

feat(day06): bazel + vite + github action to deploy a static page #14

Workflow file for this run

name: Test
on:
workflow_dispatch:
push:
branches:
- main
jobs:
test-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Bazelisk
uses: bazelbuild/setup-bazelisk@v2
- name: Setup bazel cache
uses: actions/cache@v3
with:
path: "~/.cache/bazel"
key: bazel-linux
- name: Install NodeJS dependencies
run: pnpm install
- name: Build with Bazel
run: bazel build //tools:build_packages --runs_on=linux
- name: Run tests with Bazel
run: bazel test //tools:test_linux_packages
test-macos:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install XCode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Install Bazelisk
uses: bazelbuild/setup-bazelisk@v2
- name: Setup bazel cache
uses: actions/cache@v3
with:
path: "~/.cache/bazel"
key: bazel-macos
- name: Build with Bazel
run: bazel build //tools:build_packages --runs_on=macos
# No tests for macos yet
# - name: Run tests with Bazel
# run: bazel test //tools:test_macos_packages