Skip to content

Commit

Permalink
[CI] install nats-server binary in path
Browse files Browse the repository at this point in the history
  • Loading branch information
aricart committed Jul 3, 2024
1 parent c695672 commit b052260
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 37 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ jobs:
deno-version: ${{ matrix.deno-version }}

- name: Install nats-server
uses: sigoden/install-binary@v1
uses: aricart/install-binary@v1.0.0
with:
repo: nats-io/nats-server
name: nats-server
cache: true

- name: Lint Deno Module
working-directory: core
run: |
deno fmt --check
deno lint
- name: Test Deno Module
working-directory: core
env:
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/jetstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@ jobs:
with:
deno-version: ${{ matrix.deno-version }}

- name: Set NATS Server Version
run: echo "NATS_VERSION=v2.10.17" >> $GITHUB_ENV

- 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: Install nats-server
uses: aricart/install-binary@v1.0.0
with:
repo: nats-io/nats-server
name: nats-server
cache: true

- name: Lint Deno Module
working-directory: jetstream
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/kv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@ jobs:
with:
deno-version: ${{ matrix.deno-version }}

- name: Set NATS Server Version
run: echo "NATS_VERSION=v2.10.17" >> $GITHUB_ENV

- 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: Install nats-server
uses: aricart/install-binary@v1.0.0
with:
repo: nats-io/nats-server
name: nats-server
cache: true

- name: Lint Deno Module
working-directory: kv
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/obj.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@ jobs:
with:
deno-version: ${{ matrix.deno-version }}

- name: Set NATS Server Version
run: echo "NATS_VERSION=v2.10.17" >> $GITHUB_ENV

- 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: Install nats-server
uses: aricart/install-binary@v1.0.0
with:
repo: nats-io/nats-server
name: nats-server
cache: true

- name: Lint Deno Module
working-directory: obj
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ jobs:
with:
deno-version: ${{ matrix.deno-version }}

- name: Install nats-server
uses: aricart/install-binary@v1.0.0
with:
repo: nats-io/nats-server
name: nats-server
cache: true

- name: Set NATS Server Version
run: echo "NATS_VERSION=v2.10.17" >> $GITHUB_ENV

Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,18 @@ jobs:
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: Install nats-server
uses: aricart/install-binary@v1.0.0
with:
repo: nats-io/nats-server
name: nats-server
cache: true

- name: Lint Deno Module
run: |
Expand Down

0 comments on commit b052260

Please sign in to comment.