Skip to content

Commit

Permalink
ci(test): Run Deno tests in parallel (#61)
Browse files Browse the repository at this point in the history
It runs much faster and more efficiently.
  • Loading branch information
5ouma authored Sep 18, 2024
1 parent 9ee5178 commit bb5da1b
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 49 deletions.
104 changes: 104 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: 🎽 CI

on:
push:
branches:
- main
paths:
- "**.ts"
- deno.lock
- .github/workflows/ci.yml
pull_request:
paths:
- "**.ts"
- deno.lock
- .github/workflows/ci.yml

jobs:
lint:
name: 🧹 Lint
runs-on: Ubuntu-Latest

steps:
- name: 🚚 Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: 🦕 Setup Deno
uses: denoland/setup-deno@5e01c016a857a4dbb5afe9d0f9733cd472cba985 # v1.5.1
with:
deno-version: v1.x

- name: 🧹 Lint Check
run: deno lint

- name: 📚 Lint the JSDoc
run: deno doc --lint ./src

format:
name: 📝 Format
runs-on: Ubuntu-Latest

steps:
- name: 🚚 Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: 🦕 Setup Deno
uses: denoland/setup-deno@5e01c016a857a4dbb5afe9d0f9733cd472cba985 # v1.5.1
with:
deno-version: v1.x

- name: 📝 Format Check
run: deno fmt --check

type-check:
name: 🔍 Type Check
runs-on: Ubuntu-Latest

steps:
- name: 🚚 Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: 🦕 Setup Deno
uses: denoland/setup-deno@5e01c016a857a4dbb5afe9d0f9733cd472cba985 # v1.5.1
with:
deno-version: v1.x

- name: 🔍 Type Check
run: deno check ./src

test:
name: 🧪 Test
runs-on: Ubuntu-Latest

steps:
- name: 🚚 Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: 🦕 Setup Deno
uses: denoland/setup-deno@5e01c016a857a4dbb5afe9d0f9733cd472cba985 # v1.5.1
with:
deno-version: v1.x

- name: 🧪 Run Tests
run: deno task cov

- name: ☂️ Upload Coverage
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}

dry-run-publish:
name: 📦 Dry Run Publish
runs-on: Ubuntu-Latest

steps:
- name: 🚚 Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: 🦕 Setup Deno
uses: denoland/setup-deno@5e01c016a857a4dbb5afe9d0f9733cd472cba985 # v1.5.1
with:
deno-version: v1.x

- name: 📦 Dry Run Publish
run: deno publish --dry-run
48 changes: 0 additions & 48 deletions .github/workflows/test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[![GitHub last commit](https://img.shields.io/github/last-commit/5ouma/reproxy?style=flat-square)](https://github.com/5ouma/reproxy/commit/HEAD)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/5ouma/reproxy?style=flat-square)](https://github.com/5ouma/reproxy/commits/main)
<br />
[![Test](https://img.shields.io/github/actions/workflow/status/5ouma/reproxy/test.yml?label=test&style=flat-square)](https://github.com/5ouma/reproxy/actions/workflows/test.yml)
[![CI](https://img.shields.io/github/actions/workflow/status/5ouma/reproxy/ci.yml?label=ci&style=flat-square)](https://github.com/5ouma/reproxy/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/actions/workflow/status/5ouma/reproxy/release.yml?label=release&style=flat-square)](https://github.com/5ouma/reproxy/actions/workflows/release.yml)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/5ouma/reproxy/main.svg?style=flat-square)](https://results.pre-commit.ci/latest/github/5ouma/reproxy/main)
[![codecov](https://codecov.io/github/5ouma/reproxy/graph/badge.svg?token=OQB55KXJIL)](https://codecov.io/github/5ouma/reproxy)
Expand Down

0 comments on commit bb5da1b

Please sign in to comment.