Skip to content

feat: Productivity Weekly(2024/10/30) #179

feat: Productivity Weekly(2024/10/30)

feat: Productivity Weekly(2024/10/30) #179

Workflow file for this run

name: CI for Deno
on:
pull_request:
paths:
- .github/workflows/ci-deno.yaml
- tools/**/*.ts
push:
# main ブランチで codecov へカバレッジを送るために push でもトリガーする
paths:
- .github/workflows/ci-deno.yaml
- tools/**/*.ts
branches:
- main
permissions:
contents: read
env:
# deno が package.json にあるパッケージを deno.lock で管理しようとするのを防ぐ
# ref: https://github.com/denoland/deno/issues/17916
DENO_NO_PACKAGE_JSON: 1
jobs:
check:
name: Check Deno scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-deno
with:
no-deps: true
- name: Check format
run: |
deno fmt --ext=ts --check ./tools
- name: Check lint
run: |
deno lint ./tools
test:
name: Test Deno scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-deno
- name: Test
run: |
deno test --allow-env=LOG_LEVEL --allow-read=tools --coverage=cov_profile tools/
deno coverage cov_profile --lcov --output=cov_profile.lcov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
flags: deno-unittests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}