[CI] install nats-server binary in path #15
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
name: Test nats.js | |
on: | |
push: | |
tags: | |
- '*' | |
branches: | |
- '*' | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
name: ${{ matrix.config.kind }} ${{ matrix.config.os }} | |
runs-on: ubuntu-latest-4-cores | |
environment: CI | |
strategy: | |
matrix: | |
deno-version: [1.44.4] | |
steps: | |
- name: Git Checkout Deno Module | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Use Deno Version ${{ matrix.deno-version }} | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: ${{ matrix.deno-version }} | |
- name: Set NATS Server Version | |
run: echo "NATS_VERSION=v2.10.17" >> $GITHUB_ENV | |
# this here because dns seems to be wedged on gha | |
# - name: Add hosts to /etc/hosts | |
# run: | | |
# sudo echo "145.40.102.131 demo.nats.io" | sudo tee -a /etc/hosts | |
- name: Get nats-server | |
run: | | |
wget "https://github.com/nats-io/nats-server/releases/download/$NATS_VERSION/nats-server-$NATS_VERSION-linux-amd64.zip" -O tmp.zip | |
unzip tmp.zip | |
mv nats-server-$NATS_VERSION-linux-amd64 nats-server | |
rm nats-server/README.md LICENSE | |
- name: Lint Deno Module | |
run: | | |
deno fmt --check | |
deno lint | |
- name: Test Deno Module | |
env: | |
TMPDIR: ${{ runner.temp }} | |
CI: true | |
NGS_CI_USER: ${{ secrets.NGS_CI_USER }} | |
run: | | |
deno task test | |
- name: Build nats.js | |
run: deno bundle --unstable transport-deno/src/connect.ts nats.js | |
- name: Generate lcov | |
run: deno coverage --unstable --lcov ./coverage > cov.lcov | |
- name: Upload coverage | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.github_token }} | |
path-to-lcov: ./cov.lcov | |