test: fix #154
Workflow file for this run
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: [push, pull_request] | |
name: test | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
deno: ["v1.x"] | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
name: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: ${{ matrix.deno }} | |
- name: Env | |
run: | | |
deno --version | |
- name: Format | |
if: runner.os != 'Windows' | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
make format | |
- name: Test | |
env: | |
RUST_BACKTRACE: 1 | |
run: | | |
make test | |
- name: Bundle | |
run: make bundle | |
release: | |
name: Release to Github | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'axetroy/swagger2ts' | |
needs: [test] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
deno: ["v1.x"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: ${{ matrix.deno }} | |
- name: Bundle | |
run: make bundle | |
- name: Bump version | |
env: | |
GITHUB_REF: ${{ github.ref }} | |
run: | | |
node ./script/bump.mjs | |
- name: Publish to NPM | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
package: ./package.json | |
token: ${{ secrets.NPM_TOKEN }} |