Switch to Material UI Charts #391
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: build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.1.0 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- uses: actions/setup-node@v4.1.0 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- uses: actions/cache@v4 | |
name: Setup nextjs cache | |
with: | |
path: ${{ github.workspace }}/.next/cache | |
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | |
restore-keys: | | |
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}- | |
- name: Cache Docker images. | |
uses: ScribeMD/docker-cache@0.5.0 | |
with: | |
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose.yml') }} | |
- name: Install dependencies | |
run: pnpm i --frozen-lockfile | |
- name: Get installed Playwright version | |
id: playwright-version | |
run: echo "version=$(pnpm why --json @playwright/test | jq --raw-output '.[0].devDependencies["@playwright/test"].version')" >> $GITHUB_OUTPUT | |
- name: Cache Playwright | |
uses: actions/cache@v4 | |
id: playwright-cache | |
with: | |
path: '~/.cache/ms-playwright' | |
key: '${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}' | |
restore-keys: | | |
${{ runner.os }}-playwright- | |
- name: Install Playwright with dependencies | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
run: npx playwright install --with-deps | |
- name: Install Playwright's dependencies | |
if: steps.playwright-cache.outputs.cache-hit == 'true' | |
run: npx playwright install-deps | |
- name: Build and test | |
run: | | |
pnpm run precheck | |
pnpm run test:all | |
pnpm run build | |
env: | |
USERNAME: admin | |
PASSWORD: nut_test | |
NUT_HOST: localhost | |
NUT_PORT: 3493 | |
WEB_PORT: 8080 |