Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's releases</a>.</em></p> <blockquote> <h2>v7.0.0</h2> <h2>v7 What's new</h2> <h3>Direct Uploads</h3> <p>Adds support for uploading single files directly (unzipped). Callers can set the new <code>archive</code> parameter to <code>false</code> to skip zipping the file during upload. Right now, we only support single files. The action will fail if the glob passed resolves to multiple files. The <code>name</code> parameter is also ignored with this setting. Instead, the name of the artifact will be the name of the uploaded file.</p> <h3>ESM</h3> <p>To support new versions of the <code>@actions/*</code> packages, we've upgraded the package to ESM.</p> <h2>What's Changed</h2> <ul> <li>Add proxy integration test by <a href="https://github.com/Link"><code>@Link</code></a>- in <a href="https://redirect.github.com/actions/upload-artifact/pull/754">actions/upload-artifact#754</a></li> <li>Upgrade the module to ESM and bump dependencies by <a href="https://github.com/danwkennedy"><code>@danwkennedy</code></a> in <a href="https://redirect.github.com/actions/upload-artifact/pull/762">actions/upload-artifact#762</a></li> <li>Support direct file uploads by <a href="https://github.com/danwkennedy"><code>@danwkennedy</code></a> in <a href="https://redirect.github.com/actions/upload-artifact/pull/764">actions/upload-artifact#764</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/Link"><code>@Link</code></a>- made their first contribution in <a href="https://redirect.github.com/actions/upload-artifact/pull/754">actions/upload-artifact#754</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/upload-artifact/compare/v6...v7.0.0">https://github.com/actions/upload-artifact/compare/v6...v7.0.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/upload-artifact/commit/043fb46d1a93c77aae656e7c1c64a875d1fc6a0a"><code>043fb46</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-artifact/issues/797">#797</a> from actions/yacaovsnc/update-dependency</li> <li><a href="https://github.com/actions/upload-artifact/commit/634250c1388765ea7ed0f053e636f1f399000b94"><code>634250c</code></a> Include changes in typespec/ts-http-runtime 0.3.5</li> <li><a href="https://github.com/actions/upload-artifact/commit/e454baaac2be505c9450e11b8f3215c6fc023ce8"><code>e454baa</code></a> Readme: bump all the example versions to v7 (<a href="https://redirect.github.com/actions/upload-artifact/issues/796">#796</a>)</li> <li><a href="https://github.com/actions/upload-artifact/commit/74fad66b98a6d799dc004d3353ccd0e6f6b2530e"><code>74fad66</code></a> Update the readme with direct upload details (<a href="https://redirect.github.com/actions/upload-artifact/issues/795">#795</a>)</li> <li><a href="https://github.com/actions/upload-artifact/commit/bbbca2ddaa5d8feaa63e36b76fdaad77386f024f"><code>bbbca2d</code></a> Support direct file uploads (<a href="https://redirect.github.com/actions/upload-artifact/issues/764">#764</a>)</li> <li><a href="https://github.com/actions/upload-artifact/commit/589182c5a4cec8920b8c1bce3e2fab1c97a02296"><code>589182c</code></a> Upgrade the module to ESM and bump dependencies (<a href="https://redirect.github.com/actions/upload-artifact/issues/762">#762</a>)</li> <li><a href="https://github.com/actions/upload-artifact/commit/47309c993abb98030a35d55ef7ff34b7fa1074b5"><code>47309c9</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-artifact/issues/754">#754</a> from actions/Link-/add-proxy-integration-tests</li> <li><a href="https://github.com/actions/upload-artifact/commit/02a8460834e70dab0ce194c64360c59dc1475ef0"><code>02a8460</code></a> Add proxy integration test</li> <li>See full diff in <a href="https://github.com/actions/upload-artifact/compare/v6...v7">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
216 lines
5.5 KiB
YAML
216 lines
5.5 KiB
YAML
---
|
|
name: 'CI'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- dev
|
|
pull_request:
|
|
schedule:
|
|
- cron: '17 6 * * *'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check-code:
|
|
name: Check / Code
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Setup Node and Yarn
|
|
uses: volta-cli/action@v5
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
|
|
- name: Lint
|
|
run: yarn run lint
|
|
|
|
- name: Type-check
|
|
run: yarn run typecheck
|
|
|
|
- name: Check for dead exports
|
|
run: yarn run prune
|
|
|
|
- name: Check formatting
|
|
run: yarn run format-check
|
|
|
|
# Validates the repository's own metadata, which needs neither the card built
|
|
# nor Node installed.
|
|
check-hacs:
|
|
name: Check / HACS
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: HACS validation
|
|
uses: 'hacs/action@22.5.0'
|
|
with:
|
|
category: 'plugin'
|
|
|
|
# Don't attempt to load into HACS (as it loads the release, not the
|
|
# build).
|
|
ignore: 'hacs'
|
|
|
|
test-unit:
|
|
name: Test / Unit
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Setup Node and Yarn
|
|
uses: volta-cli/action@v5
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
|
|
- name: Test & Coverage
|
|
run: yarn run coverage
|
|
|
|
test-browser:
|
|
name: Test / Browser / ${{ matrix.name }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
# Use Playwright's own image to avoid having to (slowly) install browsers
|
|
# and dependencies. The tag has to name the `playwright` version in
|
|
# package.json .
|
|
container:
|
|
image: mcr.microsoft.com/playwright:v1.62.0-noble
|
|
|
|
# As the image's own user rather than root, which Firefox refuses to run
|
|
# as when the home directory belongs to somebody else.
|
|
#
|
|
# See https://playwright.dev/docs/ci#via-containers .
|
|
options: --user 1001
|
|
|
|
strategy:
|
|
# One browser failing does not invalidate the others.
|
|
fail-fast: false
|
|
matrix:
|
|
# `name` is only how the browser is written for a human: it titles the
|
|
# job, while `browser` is the name Playwright knows it by.
|
|
include:
|
|
- browser: chromium
|
|
name: Chromium
|
|
- browser: firefox
|
|
name: Firefox
|
|
- browser: webkit
|
|
name: WebKit
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Setup Node and Yarn
|
|
uses: volta-cli/action@v5
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
|
|
- name: Browser test
|
|
run: yarn run test:browser
|
|
env:
|
|
VITEST_BROWSER: ${{ matrix.browser }}
|
|
|
|
- name: Upload browser test failures
|
|
if: failure()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: browser-test-failures-${{ matrix.browser }}
|
|
path: .vitest/
|
|
if-no-files-found: ignore
|
|
|
|
test-dist:
|
|
name: Test / Dist / ${{ matrix.name }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
# Use Playwright's own image to avoid having to (slowly) install browsers
|
|
# and dependencies. The tag has to name the `playwright` version in
|
|
# package.json .
|
|
container:
|
|
image: mcr.microsoft.com/playwright:v1.62.0-noble
|
|
|
|
# As the image's own user rather than root, which Firefox refuses to run
|
|
# as when the home directory belongs to somebody else.
|
|
#
|
|
# See https://playwright.dev/docs/ci#via-containers .
|
|
options: --user 1001
|
|
|
|
strategy:
|
|
# One browser failing does not invalidate the others.
|
|
fail-fast: false
|
|
matrix:
|
|
# `name` is only how the browser is written for a human: it titles the
|
|
# job, while `browser` is the name Playwright knows it by.
|
|
include:
|
|
- browser: chromium
|
|
name: Chromium
|
|
- browser: firefox
|
|
name: Firefox
|
|
- browser: webkit
|
|
name: WebKit
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Setup Node and Yarn
|
|
uses: volta-cli/action@v5
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
|
|
# These tests read a build rather than making one.
|
|
- name: Build
|
|
run: yarn run build
|
|
|
|
- name: Test the built card
|
|
run: yarn run test:dist
|
|
env:
|
|
VITEST_BROWSER: ${{ matrix.browser }}
|
|
|
|
- name: Upload failures
|
|
if: failure()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: dist-test-failures-${{ matrix.browser }}
|
|
path: .vitest/
|
|
if-no-files-found: ignore
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Setup Node and Yarn
|
|
uses: volta-cli/action@v5
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
|
|
- name: Build
|
|
run: yarn run build
|
|
|
|
- name: Upload javascript
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: advanced-camera-card
|
|
path: dist/*.js
|
|
|
|
# Uploaded unarchived so the self-contained treemap can be viewed directly
|
|
# in the browser rather than downloaded and unzipped. The artifact is
|
|
# named after the file, as `name` is ignored when `archive` is false.
|
|
- name: Upload bundle visualization
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
path: visualizations/treemap.html
|
|
archive: false
|