From cb5bc6c9b9080f4986641a8aa423703ba2571bc3 Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Sun, 12 Mar 2023 23:56:30 -0400 Subject: [PATCH] chore: update dprint config --- .github/config/dprint.json | 4 +--- .github/workflows/ci.yml | 8 +++----- .github/workflows/test.yml | 6 +++--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/config/dprint.json b/.github/config/dprint.json index c52a129b..d5511d0d 100644 --- a/.github/config/dprint.json +++ b/.github/config/dprint.json @@ -1,6 +1,4 @@ { - "$schema": "https://dprint.dev/schemas/v0.json", - "projectType": "openSource", "incremental": true, "indentWidth": 2, "typescript": { @@ -21,6 +19,6 @@ ".github/scripts/quickstart/**/*" ], "plugins": [ - "https://plugins.dprint.dev/typescript-0.68.0.wasm" + "https://plugins.dprint.dev/typescript-0.83.0.wasm" ] } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ecdb9d3a..16e923e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,15 +23,13 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Setup Dprint - run: | - curl -fsSL https://dprint.dev/install.sh | sh - cp /home/runner/.dprint/bin/dprint /usr/local/bin/dprint - name: Checkout master run: git checkout master - name: Format code run: | - dprint fmt --config .github/config/dprint.json + npm install -g dprint + mkdir -v -p /home/runner/.cache/dprint/cache + npx dprint fmt --config .github/config/dprint.json - name: Publish formatted code run: | set +e diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d73663ad..8de96292 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,9 +39,9 @@ jobs: uses: actions/checkout@v3 - name: Format code with dprint run: | - curl -fsSL https://dprint.dev/install.sh | sh - cp /home/runner/.dprint/bin/dprint /usr/local/bin/dprint - dprint fmt --config .github/config/dprint.json + npm install -g dprint + mkdir -v -p /home/runner/.cache/dprint/cache + npx dprint fmt --config .github/config/dprint.json - name: Build lowlighter/metrics:${{ github.head_ref || 'master' }} run: docker build -t lowlighter/metrics:$(echo ${{ github.head_ref || 'master' }} | sed 's/\//-/g') . - name: Run tests