Add basic CI for @bonfida/spl-name-service
#12
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: Check spl-name-service | |
on: | |
push: | |
branches: [main] | |
paths: | |
- 'js/**' | |
pull_request: | |
branches: [main] | |
paths: | |
- 'js/**' | |
defaults: | |
run: | |
working-directory: ./js | |
jobs: | |
prepare-dependencies: | |
name: Prepare local deps | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- id: prepare-env | |
uses: ./.github/actions/prepare-spl-name-service-env | |
- name: Use cache or install dependencies | |
if: steps.prepare-env.outputs.cache-hit != 'true' | |
run: npm ci | |
test: | |
name: Test source code | |
needs: prepare-dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- uses: ./.github/actions/prepare-spl-name-service-env | |
- name: Make envfile | |
run: | | |
rm .env || true; | |
touch .env; | |
echo "RPC_URL=${{ secrets.RPC_URL }}" >> .env; | |
- name: Test source code | |
run: npm run test |