chore: add ci #1
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: | |
| pull_request: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| nix: | |
| name: Nix Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v27 | |
| - name: Enable flakes | |
| run: | | |
| mkdir -p ~/.config/nix | |
| echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf | |
| - name: Nix flake check | |
| run: nix flake check | |
| # TODO: build host | |
| terraform: | |
| name: Terraform Checks | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: infra | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@v3 | |
| - name: Terraform fmt | |
| run: terraform fmt -check -recursive | |
| - name: Terraform init (no backend) | |
| run: terraform init -backend=false | |
| - name: Terraform validate | |
| run: terraform validate |