Skip to content

Update dependency tsdown to v0.23.1 #2850

Update dependency tsdown to v0.23.1

Update dependency tsdown to v0.23.1 #2850

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-24.04
services:
postgres:
image: postgres
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ruby/setup-ruby@e1bd6146574da5e0795075b5319b300edb30c5b0 # v1.333.0
with:
working-directory: rfd-processor
bundler-cache: true
- name: Install PDF toolchain
shell: bash
working-directory: rfd-processor
run: |
bundle config set bin .bundle/bin
bundle binstubs asciidoctor asciidoctor-pdf
npm ci
printf '%s\n' '{"args":["--no-sandbox"]}' > .bundle/bin/puppeteer.json
printf '%s\n' '#!/usr/bin/env bash' \
"exec '$PWD/node_modules/.bin/mmdc' --puppeteerConfigFile '$PWD/.bundle/bin/puppeteer.json' \"\$@\"" \
> .bundle/bin/mmdc
chmod +x .bundle/bin/mmdc
echo "$PWD/.bundle/bin" >> "$GITHUB_PATH"
- name: Report versions
run: |
asciidoctor --version
asciidoctor-pdf --version
mmdc --version
- run: |
rustup toolchain install
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
- run: |
cargo test
env:
TEST_DATABASE: postgres://test:test@localhost
RUST_LOG: v=trace,rfd=trace
- name: Verify RFD 9999 PDF fixture
shell: bash
run: |
expected_pdf="rfd-processor/tests/rfd_9999.pdf"
generated_pdf="rfd-processor/tests/rfd_9999-generated.pdf"
diff_pdf="rfd-processor/tests/rfd_9999-diff.pdf"
cargo run --profile test -p rfd-processor -- pdf rfd-processor/tests/rfd_9999 -o "$generated_pdf"
expected_checksum="$(sha256sum "$expected_pdf" | cut -d ' ' -f 1)"
generated_checksum="$(sha256sum "$generated_pdf" | cut -d ' ' -f 1)"
if [[ "$expected_checksum" != "$generated_checksum" ]]; then
echo "Rendered PDF does not match checked-in RFD 9999 PDF"
sudo apt-get update
sudo apt-get install -y diff-pdf-wx xvfb
xvfb-run -a diff-pdf --skip-identical --mark-differences "$expected_pdf" "$generated_pdf" --output-diff "$diff_pdf" || true
exit 1
fi
- name: Upload rendered PDF
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: rfd-processor-rfd-9999-pdf-artifacts
path: |
rfd-processor/tests/rfd_9999-generated.pdf
rfd-processor/tests/rfd_9999-diff.pdf
if-no-files-found: ignore
generate:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: |
rustup toolchain install
rustup toolchain install nightly --component rustfmt
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
- name: Install Dprint
run: |
mkdir -p "$HOME/.dprint/bin"
curl -fsSL \
"https://github.com/dprint/dprint/releases/download/${DPRINT_VERSION}/${DPRINT_ASSET}" \
> "$HOME/.dprint/bin/${DPRINT_ASSET}"
cd "$HOME/.dprint/bin"
echo "${DPRINT_HASH} ${DPRINT_ASSET}" | sha256sum --check
unzip "${DPRINT_ASSET}"
rm "${DPRINT_ASSET}"
echo "/home/runner/.dprint/bin" >> "$GITHUB_PATH"
env:
DPRINT_VERSION: 0.53.0
DPRINT_HASH: 987185f5f0db6205e5bca88aaab04a7b29bc18bf7a8c1a84f56eef08c9730df0
DPRINT_ASSET: dprint-x86_64-unknown-linux-gnu.zip
- name: Verify SDK Generation
run: |
cargo xtask generate
GENERATED="rfd-api-spec.json rfd-sdk/src/generated/ rfd-cli/src/generated/ rfd-ts/"
if ! git diff --quiet -- "$GENERATED"; then
git diff -- "$GENERATED"
echo "Found changed files after generating SDKs:"
git status -s -- "$GENERATED"
echo "To fix, regenerate with, commit the changes from running:"
echo " cargo xtask generate"
exit 1
fi
parser:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Verify parse-rfd parser bundle
working-directory: parse-rfd/parser
run: |
npm ci
npm run build
if ! git diff --quiet HEAD -- dist/index.js; then
git diff --stat HEAD -- dist/index.js
echo "parse-rfd/parser/dist/index.js does not match a fresh build from index.js and package-lock.json"
echo "To fix, rebuild the bundle and commit the result:"
echo " cd parse-rfd/parser && npm ci && npm run build"
exit 1
fi