release: v0.3.0 #216
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: CI | |
| on: | |
| push: | |
| branches: [main, dev] | |
| pull_request: | |
| branches: [main, dev] | |
| # Workflow-level least privilege. CI doesn't need to write to the repo, | |
| # create issues, or push container images — read-only is enough. | |
| permissions: | |
| contents: read | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Shellcheck | |
| run: | | |
| sudo apt-get install -y shellcheck | |
| shellcheck frontend/public/install.sh | |
| shellcheck frontend/public/scripts/uconsole | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Device tests (pytest) | |
| run: | | |
| pip install pytest pyflakes | |
| python -m pytest tests/ -v | |
| - name: Shell script checks | |
| run: | | |
| bash -n frontend/public/scripts/uconsole | |
| find device/scripts -name "*.sh" ! -type l -exec bash -n {} \; | |
| - name: Lint | |
| run: npm run lint -w @uconsole/frontend | |
| - name: Typecheck | |
| run: npx -w @uconsole/frontend tsc --noEmit | |
| - name: Test | |
| run: npm test -w @uconsole/frontend | |
| - name: Build | |
| run: npm run build -w @uconsole/frontend | |
| env: | |
| NEXT_PUBLIC_SANITY_PROJECT_ID: ${{ vars.NEXT_PUBLIC_SANITY_PROJECT_ID }} | |
| install-test: | |
| runs-on: ubuntu-latest | |
| needs: ci | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up QEMU (arm64 emulation) | |
| uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3 | |
| with: | |
| platforms: arm64 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 | |
| - name: Build .deb | |
| run: bash packaging/build-deb.sh | |
| - name: Run install tests (arm64 Debian Bookworm) | |
| run: | | |
| docker buildx build \ | |
| --platform linux/arm64 \ | |
| --load \ | |
| -f packaging/Dockerfile.test \ | |
| -t uconsole-test . | |
| - name: Verify test image | |
| run: | | |
| docker run --rm uconsole-test /usr/bin/uconsole --version |