Chore/ci workflows #8
Workflow file for this run
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
| name: web3mail-dapp-ci | |
| on: | |
| pull_request: | |
| paths: | |
| - 'dapp/**' | |
| concurrency: | |
| group: ${{ github.ref }}-dapp-ci | |
| cancel-in-progress: true | |
| env: | |
| WORKING_DIRECTORY: ./dapp | |
| jobs: | |
| check-code: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 14 | |
| cache: 'npm' | |
| cache-dependency-path: dapp/package-lock.json | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| - name: Check format (prettier) | |
| run: npm run check-format | |
| test: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| env: | |
| MJ_APIKEY_PUBLIC: ${{ secrets.MAILJET_APIKEY_PUBLIC }} | |
| MJ_APIKEY_PRIVATE: ${{ secrets.MAILJET_APIKEY_PRIVATE }} | |
| MJ_SENDER: ${{ secrets.MAILJET_SENDER }} | |
| MAILGUN_APIKEY: ${{ secrets.MAILGUN_APIKEY }} | |
| WEB3MAIL_WHITELISTED_APPS: ${{ secrets.WEB3MAIL_WHITELISTED_APPS }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 14 | |
| cache: 'npm' | |
| cache-dependency-path: dapp/package-lock.json | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Test unit | |
| run: npm run test | |
| - name: Test with coverage | |
| run: npm run ctest | |
| docker-dry-run: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ${{ env.WORKING_DIRECTORY }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Docker dry run build | |
| run: | | |
| docker build -t web3mail-dapp:dryrun . |