ci: Introduce a basic test+lint workflow
This removes the old workflows that had not been working for a while and introduces a new microvm based one that does some basic checks and runs the default test suite.
12345678910111213141516171819202122232425when: - event: ["push", "pull_request"] branch: ["main"]
engine: microvmimage: nixos
dependencies: - rustup - gcc - pkg-config - openssl - protobuf - just - cargo-nextest
steps: - name: fmt command: cargo fmt -- --check - name: check command: cargo check --all-targets - name: clippy command: just clippy - name: test command: just test123456789101112131415161718192021when: - event: ["push", "manual"] branch: ["main"]
engine: nixery
dependencies: nixpkgs: - nix - cachix - gnugrep
steps: - name: Authenticate command: | cachix authtoken "$CACHIX_AUTH_TOKEN"
- name: Build and push aarch64 command: | SUBS="--option extra-substituters https://tranquil.cachix.org --option extra-trusted-public-keys tranquil.cachix.org-1:PoO+mGL6a6LcJiPakMDHN4E218/ei/7v2sxeDtNkSRg=" nix-store -qR --include-outputs $(nix-store -qd $(nix build .#packages.x86_64-linux.tranquil-pds-aarch64 $SUBS --print-out-paths --no-link)) | grep -v '\.drv$' | cachix push tranquil12345678910111213141516171819202122232425262728when: - event: ["push", "manual"] branch: ["main"]
engine: nixery
dependencies: nixpkgs: - nix - cachix - gnugrep
steps: - name: Authenticate command: | cachix authtoken "$CACHIX_AUTH_TOKEN"
- name: Build and push x86_64 command: | SUBS="--option extra-substituters https://tranquil.cachix.org --option extra-trusted-public-keys tranquil.cachix.org-1:PoO+mGL6a6LcJiPakMDHN4E218/ei/7v2sxeDtNkSRg=" nix-store -qR --include-outputs $(nix-store -qd $(nix build .#packages.x86_64-linux.tranquil-pds $SUBS --print-out-paths --no-link)) | grep -v '\.drv$' | cachix push tranquil nix-store -qR --include-outputs $(nix-store -qd $(nix build .#packages.x86_64-linux.tranquil-frontend $SUBS --print-out-paths --no-link)) | grep -v '\.drv$' | cachix push tranquil
- name: Build and push devShell command: | SUBS="--option extra-substituters https://tranquil.cachix.org --option extra-trusted-public-keys tranquil.cachix.org-1:PoO+mGL6a6LcJiPakMDHN4E218/ei/7v2sxeDtNkSRg=" nix develop $SUBS --profile dev-profile -c true cachix push tranquil dev-profile123456789101112131415161718192021222324252627282930313233343536when: - event: [ "manual" ] - event: [ "push" ] branch: [ "main" ]
engine: nixery
dependencies: nixpkgs: - kaniko
environment: DOCKER_CONFIG: "/kaniko/.docker"
steps: - name: Configure Kaniko command: | mkdir -p /kaniko/.docker/ echo "{ \"auths\": { \"https://atcr.io/v1\":{ \"auth\": \"$ATCR_CREDENTIALS\" } } }" > /kaniko/.docker/config.json
- name: Build image command: | executor \ --context=$(pwd) \ --ignore-path=$(pwd) \ --dockerfile=$(pwd)/Dockerfile \ --destination="atcr.io/tranquil.farm/tranquil-pds:latest" \ --destination="atcr.io/tranquil.farm/tranquil-pds:$TANGLED_COMMIT_SHA" \ --push-retry=3 \ --skip-push-permission-check