feat(uniregistrar): β¨ docker image #170
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: 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 |