Skip to content

fix: πŸ› align client contracts to work in the same way #183

fix: πŸ› align client contracts to work in the same way

fix: πŸ› align client contracts to work in the same way #183

Workflow file for this run

name: Tests
on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
branches:
- main
- release/**
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
branches:
- main
- release/**
jobs:
test-units:
runs-on: ubuntu-latest
name: πŸ§ͺ Contract unit tests
steps:
- name: πŸ›ŽοΈ Checkout
uses: actions/checkout@v4
- name: ⏬ Install Zenroom
run: |
wget https://github.com/dyne/zenroom/releases/latest/download/zenroom -O zenroom
chmod +x zenroom
cp zenroom test/
- name: πŸ’Ύ Clone W3C-DID-data in data
run: |
rm -rf data
git clone https://github.com/dyne/W3C-DID-data.git data
- name: πŸ§ͺ Run tests
run: |
make test-units
restroom_job:
runs-on: ubuntu-latest
name: πŸ”¬ API integration tests
steps:
- name: πŸ›ŽοΈ Checkout
uses: actions/checkout@v4
- name: ⏬ Install Zenroom
run: |
wget https://github.com/dyne/zenroom/releases/latest/download/zenroom -O zenroom
chmod +x zenroom
sudo cp zenroom /usr/local/bin/zenroom
- name: ⏬ Install restroom-test
run: |
wget https://github.com/dyne/zencode-tools/releases/latest/download/restroom-test -O restroom-test
chmod +x restroom-test
- name: πŸ’Ύ Clone W3C-DID-data in data
run: |
rm -rf data
git clone https://github.com/dyne/W3C-DID-data.git data
- name: πŸ—οΈ Create server keys
run: |
cp test/restroom/test_keyring.json secrets/blockchains_client.json
cd restroom
mv .env.example .env
npm ci && npm run init
- name: πŸ›« Start restroom
uses: dyne/restroom-github-action@v1
with:
restroom-contracts: "${{ github.workspace }}/api"
restroom-files: "${{ github.workspace }}/"
restroom-logger: "${{ github.workspace }}/"
- name: πŸ§ͺ Run tests
run: |
sleep 10
echo "SANDBOX"
./test/restroom/run.sh sandbox
echo ""
echo "IFACER"
./test/restroom/run.sh ifacer
mylog=`cat api_dyne_v1.log`
if [ "$mylog" = "" ]; then
echo ""
echo "empty log"
exit 1
fi
js-build-check:
name: 🐯 js build & checks
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
env:
SANDBOX_TEST_ADMIN_KEYRING: ${{secrets.SANDBOX_TEST_ADMIN_KEYRING}}
defaults:
run:
working-directory: bindings/javascript
steps:
- name: πŸ›ŽοΈ Checkout
uses: actions/checkout@v4
- name: βš™οΈ Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: ⏬ Install dependencies
run: npm ci
- name: πŸ—οΈ Build javascript bindings
run: npm run build
- name: ⏫ Upload artifact
if: ${{ matrix.node-version == '16.x' }}
uses: actions/upload-artifact@v3
with:
name: javascript-artifact
path: |
./bindings/javascript/package.json
./bindings/javascript/README.md
./bindings/javascript/dist/
- name: πŸ§ͺ Test bindings node-${{ matrix.node-version }}
run: npm test