name: CodeView CI on: push: branches: [main] pull_request: branches: [main] jobs: lint: runs-on: docker steps: - uses: actions/checkout@v4 - name: Lint run: | if [ -f package.json ]; then npm ci && npm run lint; else echo "no lint configured"; fi tests: runs-on: docker needs: lint steps: - uses: actions/checkout@v4 - name: Unit tests run: | if [ -f package.json ]; then npm test; elif [ -f pyproject.toml ]; then pip install -e . && pytest; else echo "no tests configured"; fi docker-build: runs-on: docker needs: tests steps: - uses: actions/checkout@v4 - name: Docker build run: | if [ -f Dockerfile ]; then docker build -t app:ci .; elif [ -f docker-compose.yml ]; then docker compose build; else echo "no docker build configured"; fi