.github/workflows/ci.yaml #1005
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
schedule: | |
- cron: '0 9 * * *' | |
push: | |
pull_request: | |
env: | |
DENO_VERSION: 1.x | |
NODE_VERSION: 20.x | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
check-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: ${{ env.DENO_VERSION }} | |
- run: deno lint | |
- name: Test | |
run: | | |
deno lint | |
deno fmt --check | |
deno task check | |
deno task test:coverage | |
deno task coverage:lco | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.3.1 | |
with: | |
file: ./coverage.lcov | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: ryoppippi/str-fns | |
jsr-publish-dry-run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: ${{ env.DENO_VERSION }} | |
- run: deno publish --dry-run | |
npm-publish-dry-run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: ${{ env.DENO_VERSION }} | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: "https://registry.npmjs.org" | |
- run: deno task build-npm | |
- run: | | |
cd npm | |
npm publish --dry-run | |
action-timeline: | |
needs: | |
- check-test | |
- jsr-publish-dry-run | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Kesin11/actions-timeline@v2 |