Updated README #1
This file contains hidden or 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
| # CI Workflow for SuperDapp WebCrypto | |
| # This workflow installs dependencies, builds the source, and runs tests on multiple Node.js versions. | |
| name: CI - Node.js | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/* | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [16.x, 18.x, 20.x] | |
| # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| - name: Set Up Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Run Build (If Applicable) | |
| run: npm run build --if-present | |
| - name: Run Tests | |
| run: npm test | |
| - name: Upload Coverage (Optional) | |
| if: success() | |
| run: npm run coverage --if-present |