mirror of
https://github.com/classchartsapi/classcharts-api-js.git
synced 2026-05-14 03:56:59 +00:00
chore: add test github workflow
This commit is contained in:
parent
40c370c151
commit
fa3487e5a4
2 changed files with 48 additions and 4 deletions
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
|
|
@ -10,23 +10,26 @@ jobs:
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
deno: ["1.x"]
|
||||||
|
node: ["18"]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v1
|
||||||
with:
|
with:
|
||||||
deno-version: v1.36.x
|
deno-version: ${{ matrix.deno }}
|
||||||
- name: Get tag version
|
- name: Get tag version
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
id: get_tag_version
|
id: get_tag_version
|
||||||
run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT
|
run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "18.x"
|
node-version: ${{ matrix.node }}
|
||||||
registry-url: "https://registry.npmjs.org"
|
|
||||||
- uses: pnpm/action-setup@v2
|
- uses: pnpm/action-setup@v2
|
||||||
with:
|
with:
|
||||||
version: 8
|
version: latest
|
||||||
- name: npm build
|
- name: npm build
|
||||||
run: deno task npm ${{steps.get_tag_version.outputs.TAG_VERSION}}
|
run: deno task npm ${{steps.get_tag_version.outputs.TAG_VERSION}}
|
||||||
- name: npm publish
|
- name: npm publish
|
||||||
|
|
|
||||||
41
.github/workflows/test.yml
vendored
Normal file
41
.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
name: test
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-deno:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
deno: ["1.x"]
|
||||||
|
name: Test Deno on Version ${{ matrix.deno }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- uses: denoland/setup-deno@v1
|
||||||
|
with:
|
||||||
|
deno-version: ${{ matrix.deno }}
|
||||||
|
- name: Run tests in Deno
|
||||||
|
run: deno test -A
|
||||||
|
test-node:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
deno: ["1.x"]
|
||||||
|
node: ["18", "20"]
|
||||||
|
name: Test Node on Version ${{ matrix.node }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- uses: denoland/setup-deno@v1
|
||||||
|
with:
|
||||||
|
deno-version: ${{ matrix.deno }}
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node }}
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
- name: Build and test node
|
||||||
|
run: deno task npm 0.0.0
|
||||||
Loading…
Add table
Add a link
Reference in a new issue