Skip to content

Ignore superseded password sign-in responses #1906

Ignore superseded password sign-in responses

Ignore superseded password sign-in responses #1906

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
name: Validate on Node ${{ matrix.node }}
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
node: [22, 24]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ matrix.node }}
- run: npm install --ignore-scripts
- run: npm run check
- run: npm test
# The whole suite on macOS (#215), so Linux/macOS support doesn't rot.
test-macos:
name: Test on macOS
runs-on: macos-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- run: npm install --ignore-scripts
- run: npm test
# Real Secret Service round trip for the Linux credential adapter, and the
# Linux entry point running the server and card from it (#215).
secret-service:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libsecret-tools gnome-keyring dbus
- name: Linux credential adapter against gnome-keyring
run: |
dbus-run-session -- sh -c 'printf ci | gnome-keyring-daemon --unlock --components=secrets >/dev/null && NOWPLAYING_SECRET_SERVICE_TEST=1 node --test --test-reporter=spec test/linux-credential-adapter.test.js test/unix-entry.test.js'
# Real Keychain round trip for the macOS credential adapter (#215), in a
# throwaway keychain so the runner's own keychain isn't touched.
keychain:
runs-on: macos-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- name: Throwaway keychain
run: |
security create-keychain -p ci nowplaying-ci.keychain
security set-keychain-settings nowplaying-ci.keychain
security unlock-keychain -p ci nowplaying-ci.keychain
security list-keychains -d user -s nowplaying-ci.keychain
security default-keychain -d user -s nowplaying-ci.keychain
- name: macOS credential adapter against the Keychain
run: NOWPLAYING_KEYCHAIN_TEST=1 node --test --test-reporter=spec test/macos-credential-adapter.test.js
coverage:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # Codecov OIDC upload, no stored token
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- run: npm install --ignore-scripts
- run: npm run test:coverage -- --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=junit.xml
- uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
files: lcov.info
use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }}
fail_ci_if_error: false
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
report_type: test_results
files: junit.xml
use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }}
fail_ci_if_error: false
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- run: npm install --ignore-scripts
- run: npm run build
- run: test -s dist/card.svg && test -s dist/manifest.json
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: nowplaying-build
path: dist
if-no-files-found: error
retention-days: 7