-
Notifications
You must be signed in to change notification settings - Fork 51
81 lines (68 loc) · 2.3 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: NATS.deno
on:
push:
tags:
- '*'
branches:
- '*'
pull_request:
branches: [master]
jobs:
test:
name: ${{ matrix.config.kind }} ${{ matrix.config.os }}
runs-on: ubuntu-latest-4-cores
environment: CI
strategy:
matrix:
deno-version: [1.43.5]
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.14" >> $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 --ignore=docs/
- name: Test Deno Module
env:
TMPDIR: ${{ runner.temp }}
CI: true
NGS_CI_USER: ${{ secrets.NGS_CI_USER }}
run: |
deno test --allow-all --unstable --parallel --fail-fast --coverage=./cov tests/ jetstream/tests
deno test --allow-all --unstable --parallel --fail-fast --unsafely-ignore-certificate-errors --coverage=./cov unsafe_tests/
- name: Build nats.js
run: deno bundle --unstable src/connect.ts nats.js
- name: Generate lcov
run: deno coverage --unstable --lcov ./cov > cov.lcov
- name: Upload coverage
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: ./cov.lcov
- name: Release
uses: softprops/action-gh-release@v1
if: |
startsWith(github.ref, 'refs/tags/') &&
!startsWith(github.ref, 'refs/tags/std/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
nats.js
draft: true