Optimize devcontainer for faster startup (#9) #33
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 ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| actions: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| name: Build and Validate | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Lint Dockerfile | |
| uses: hadolint/[email protected] | |
| with: | |
| dockerfile: .devcontainer/Dockerfile | |
| - name: Check for secrets | |
| uses: gitleaks/gitleaks-action@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build Docker image | |
| run: | | |
| docker build -t dev-template:latest .devcontainer/ | |
| test: | |
| runs-on: ubuntu-latest | |
| name: Test Devcontainer | |
| needs: build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Test devcontainer functionality | |
| uses: devcontainers/[email protected] | |
| with: | |
| push: never | |
| runCmd: | | |
| # Test basic tools are available | |
| which python3 || echo "python3 is missing" | |
| which pip3 || echo "pip3 is missing" | |
| which docker || echo "docker is missing" | |
| which gh || echo "gh is missing" | |
| which node || echo "node is missing" | |
| which npm || echo "npm is missing" | |
| which claude || echo "claude is missing" | |
| # Test essential packages | |
| python3 --version | |
| node --version | |
| docker --version | |
| gh --version | |
| claude --version | |
| curl --version | |
| jq --version |