Skip to content

ci(smoke-test): Move build tests to justfile #184

ci(smoke-test): Move build tests to justfile

ci(smoke-test): Move build tests to justfile #184

Workflow file for this run

name: Smoke test
on:
push:
paths:
- 'flake.lock'
- 'pkgs/**'
- 'modules/**'
- 'test/**'
- '.github/workflows/smoke-test.yml'
workflow_dispatch:
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
accept-flake-config = true
- name: Update the flake inputs for the test
run: |
nix develop -c just local-update-flake
working-directory: test
- name: Test
working-directory: test
run: nix develop -c just test-build
- name: Get the system
id: system
run: |
system=$(nix eval --impure --expr builtins.currentSystem)
echo "system=$system" >> $GITHUB_OUTPUT
echo "emacs=packages.$system.emacs" >> $GITHUB_OUTPUT
- run: |
nix eval --json .#${{ steps.system.outputs.emacs }}.initFiles \
| jq
working-directory: test
- run: |
nix eval --json .#${{ steps.system.outputs.emacs }}.packageInputs \
| jq
working-directory: test
- run: |
nix eval --json .#${{ steps.system.outputs.emacs }}.revDeps \
| jq
working-directory: test
- run: |
nix eval --json .#${{ steps.system.outputs.emacs }}.maskedBuiltins \
| jq
working-directory: test
- run: |
nix eval --json .#${{ steps.system.outputs.emacs }}.elispPackages.magit \
| jq
working-directory: test
- name: Perform a complete build of a wrapper with an empty config
run: |
nix build .#emacs-wrapper
nix run .#emacs-wrapper -- --version
working-directory: test
- name: Check the build output of the wrapper
run: |
nix build .#checks.${{ steps.system.outputs.system }}.symlink
working-directory: test
- name: Build home-manager configuration
run: |
nix build .#homeConfigurations.${{ steps.system.outputs.system }}.activationPackage
test -f result/home-files/.local/share/emacs/init.el
test -f result/home-files/.local/share/emacs/early-init.el
test -x result/home-path/bin/emacsclient
test -x result/home-path/bin/my-emacs
result/home-path/bin/my-emacs -batch -l consult
working-directory: test
- run: nix flake show