Test the project #9
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: Test | |
| run-name: Test the project | |
| on: | |
| workflow_dispatch: | |
| push: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v3 | |
| - uses: leanprover/lean-action@v1 | |
| with: | |
| build: true | |
| test: true | |
| lint: false | |
| use-github-cache: false | |
| use-mathlib-cache: false | |
| check-reservoir-eligibility: false | |
| lake-package-directory: "server" | |
| - run: elan default stable | |
| - name: Build the project | |
| run: | | |
| npm install | |
| npm run build | |
| npm run build:test | |
| - name: Run Cypress tests (Development mode) | |
| run: npm run test | |
| - name: Install Bubblewrap | |
| run: sudo apt-get install bubblewrap | |
| - name: Configure AppArmor for Bubblewrap (https://etbe.coker.com.au/2024/04/24/ubuntu-24-04-bubblewrap/) | |
| run: | | |
| sudo tee /etc/apparmor.d/bwrap > /dev/null << 'EOF' | |
| abi <abi/4.0>, | |
| include <tunables/global> | |
| profile bwrap /usr/bin/bwrap flags=(unconfined) { | |
| userns, | |
| # Site-specific additions and overrides. See local/README for details. | |
| include if exists <local/bwrap> | |
| } | |
| EOF | |
| sudo systemctl reload apparmor | |
| - name: Run Cypress tests (Production mode) | |
| run: npm run test:prod |