ci: unscoped npm package check

This commit is contained in:
Evan Gray 2022-10-20 17:00:35 -04:00 committed by Evan Gray
parent 40279fe668
commit 32f0159319
2 changed files with 23 additions and 5 deletions

View File

@ -119,8 +119,8 @@ jobs:
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.toolchain.outputs.version }}
components: "clippy,rustfmt"
toolchain: ${{ steps.toolchain.outputs.version }}
components: "clippy,rustfmt"
- name: Cache rust packages
uses: actions/cache@v3
@ -139,11 +139,11 @@ jobs:
- name: Run `cargo check`
run: cargo check --workspace --tests --manifest-path solana/Cargo.toml
--features "nft-bridge/instructions token-bridge/instructions wormhole-bridge-solana/instructions"
--features "nft-bridge/instructions token-bridge/instructions wormhole-bridge-solana/instructions"
- name: Run `cargo clippy`
run: cargo clippy --workspace --tests --manifest-path solana/Cargo.toml
--features "nft-bridge/instructions token-bridge/instructions wormhole-bridge-solana/instructions"
--features "nft-bridge/instructions token-bridge/instructions wormhole-bridge-solana/instructions"
- name: Cache solana tools
id: cache-solana
@ -233,7 +233,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.19.0'
go-version: "1.19.0"
- run: curl https://get.ignite.com/cli@v0.23.0 | bash && mv ignite /usr/local/bin/
- run: cd wormhole_chain && make proto -B && make test
@ -302,3 +302,10 @@ jobs:
uses: actions/checkout@v2
- run: chmod 755 ./scripts/check-docker-pin.sh
- run: ./scripts/check-docker-pin.sh
npm-packages:
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@v2
- run: chmod 755 ./scripts/check-npm-package-scopes.sh
- run: ./scripts/check-npm-package-scopes.sh

View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# This script checks to ensure that all our NPM packages have an appropriate scope.
#
git ls-files | grep "package.json" | xargs grep -s "\"name\":" | egrep -v '@certusone/|@wormhole-foundation/'
if [ $? -eq 0 ]; then
echo "[!] Unscoped npm packages" >&2
exit 1
else
echo "[+] No unscoped npm packages"
fi