From 5db595e8e290900074baa2d249a937d22653a2d2 Mon Sep 17 00:00:00 2001 From: ryu <114303361+ryuapp@users.noreply.github.com> Date: Fri, 13 Dec 2024 01:36:34 +0900 Subject: [PATCH] ci: check format, lint and tests (#11) * ci: check format, lint and tests * use windows * use macos --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ .github/workflows/publish.yml | 4 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e980cdc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: ci +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + ci: + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Deno + uses: denoland/setup-deno@v2 + + - name: Format + run: deno fmt --check + + - name: Lint + run: deno lint + + - name: Test + run: deno task test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e094d33..2c604f2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - id-token: write # The OIDC ID token is used for authentication with JSR. + id-token: write # The OIDC ID token is used for authentication with JSR. steps: - uses: actions/checkout@v4 - - run: npx jsr publish \ No newline at end of file + - run: npx jsr publish