Skip to content

Commit

Permalink
[CI] run modules tests in matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
aricart committed Jul 3, 2024
1 parent b052260 commit 7b45055
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 34 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ on:
- '*'
jobs:
test:
name: ${{ matrix.config.kind }} ${{ matrix.config.os }}
name: test core with released dependencies
runs-on: ubuntu-latest-4-cores
environment: CI
strategy:
matrix:
deno-version: [1.44.4]
deno-version: [1.x.x]
permissions:
contents: read
id-token: write

steps:
- name: Git Checkout Core
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/jetstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ on:
- '*'
jobs:
test:
name: ${{ matrix.config.kind }} ${{ matrix.config.os }}
name: test jetstream with released dependencies
runs-on: ubuntu-latest-4-cores
environment: CI
strategy:
matrix:
deno-version: [1.44.4]
deno-version: [1.x.x]

steps:
- name: Git Checkout JetStream
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/kv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ on:
- '*'
jobs:
test:
name: ${{ matrix.config.kind }} ${{ matrix.config.os }}
name: test kv with released dependencies
runs-on: ubuntu-latest-4-cores
environment: CI
strategy:
matrix:
deno-version: [1.44.4]
deno-version: [1.x.x]

steps:
- name: Git Checkout Kv
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/obj.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ on:
- '*'
jobs:
test:
name: ${{ matrix.config.kind }} ${{ matrix.config.os }}
name: test obj with released dependencies
runs-on: ubuntu-latest-4-cores
environment: CI
strategy:
matrix:
deno-version: [1.44.4]
deno-version: [1.x.x]

steps:
- name: Git Checkout Obj
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ on:
- '*'
jobs:
test:
name: ${{ matrix.config.kind }} ${{ matrix.config.os }}
name: test services with released dependencies
runs-on: ubuntu-latest-4-cores
environment: CI
strategy:
matrix:
deno-version: [1.44.4]
deno-version: [1.x.x]

steps:
- name: Git Checkout Services
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down
40 changes: 21 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,22 @@ on:
- '*'
pull_request:
branches: [main]
types: [opened, edited, reopened]

jobs:
test:
name: ${{ matrix.config.kind }} ${{ matrix.config.os }}
runs-on: ubuntu-latest-4-cores
environment: CI
strategy:
matrix:
deno-version: [1.44.4]
deno-version: [ 1.44.4 ]
module: [ core, jetstream, kv, obj, services ]

name: test ${{matrix.module}} with local dependencies
runs-on: ubuntu-latest-4-cores
environment: CI

steps:
- name: Git Checkout Deno Module
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand All @@ -34,7 +37,6 @@ jobs:
# run: |
# sudo echo "145.40.102.131 demo.nats.io" | sudo tee -a /etc/hosts


- name: Install nats-server
uses: aricart/[email protected]
with:
Expand All @@ -47,23 +49,23 @@ jobs:
deno fmt --check
deno lint
- name: Test Deno Module
- name: Test ${{matrix.module}} 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
deno task test-${{ matrix.module }}
- 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
# - 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

0 comments on commit 7b45055

Please sign in to comment.