Skip to content

Commit

Permalink
Refine GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed Nov 14, 2022
1 parent 5ef1364 commit 35c3b4a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 42 deletions.
72 changes: 34 additions & 38 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,55 @@
name: Test

env:
DENO_VERSION: 1.x

on:
schedule:
- cron: "0 7 * * 0"
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
check:
strategy:
matrix:
runner:
- ubuntu-latest
version:
- "1.x"
- "1.28.x"
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v2
- uses: denoland/setup-deno@main
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Lint
run: deno lint

format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: denoland/setup-deno@main
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Format
deno-version: "${{ matrix.version }}"
- name: Lint check
run: |
make lint
- name: Format check
run: |
deno fmt --check
make fmt-check
- name: Type check
run: |
make type-check
test:
runs-on: ubuntu-latest
strategy:
matrix:
runner:
- windows-latest
- macos-latest
- ubuntu-latest
version:
- "1.x"
- "1.28.x"
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v2
- uses: denoland/setup-deno@main
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
deno-version: "${{ matrix.version }}"
- name: Test
run: |
deno test
make test
timeout-minutes: 5

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: denoland/setup-deno@main
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Type check
run: |
deno test --unstable --no-run ./*.ts
7 changes: 3 additions & 4 deletions .github/workflows/udd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ jobs:
udd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: "1.x"
- name: Update dependencies
run: |
make tools
make update > ../output.txt
make deps > ../output.txt
env:
NO_COLOR: 1
- name: Read ../output.txt
Expand All @@ -36,7 +35,7 @@ jobs:
${{ steps.log.outputs.content }}
EOM
- uses: peter-evans/create-pull-request@v3
- uses: peter-evans/create-pull-request@v4
with:
title: ":package: Update Deno dependencies"
body: |
Expand Down

0 comments on commit 35c3b4a

Please sign in to comment.