-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (73 loc) · 2.48 KB
/
Copy pathmelpazoid.yml
File metadata and controls
85 lines (73 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Run melpazoid on your rice project
on:
workflow_call:
inputs:
rice-config:
required: false
type: string
default: 'github:emacs-twist/rice-config'
melpa:
required: false
type: string
default: 'github:melpa/melpa'
registries:
required: false
type: string
default: 'github:emacs-twist/registries'
lock-dir:
required: false
type: string
default: '.rice-lock/default'
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
include: ${{ steps.matrix.outputs.include }}
steps:
- uses: actions/checkout@v7
- uses: cachix/install-nix-action@v31.11.1
with:
# Pin the Nix version to temporarily work around a Nix bug.
# See https://github.com/emacs-twist/twist.nix/issues/159
install_url: https://releases.nixos.org/nix/nix-2.20.8/install
- name: Get the matrix
id: matrix
run: |
set -e
echo "include=$(nix eval "${{ inputs.rice-config }}#melpaRecipes" --json --apply 'attrs: builtins.attrValues (builtins.mapAttrs (package: recipe: { inherit package recipe; }) attrs)' \
${{ inputs.lock-dir != '' && format('--override-input rice-lock "path:$PWD/{0}"', inputs.lock-dir) || '' }} \
--override-input registries "${{ inputs.registries }}" \
--override-input rice-src "path:$PWD" --override-input melpa "${{ inputs.melpa }}")" \
>> "$GITHUB_OUTPUT"
check:
needs: matrix
strategy:
matrix:
include: ${{ fromJSON(needs.matrix.outputs.include) }}
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
path: src
- uses: actions/checkout@v7
with:
repository: riscy/melpazoid
path: melpazoid
# Install Python and melpazoid in the same way as the original repository.
# See https://github.com/riscy/melpazoid/blob/master/.github/workflows/test.yml
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: 3.13.2
- name: Install melpazoid
working-directory: melpazoid
run: |
sudo apt-get install emacs
emacs --version
python -m pip install --upgrade pip
pip install . mypy pytest black
- name: Check the package using melpazoid
working-directory: melpazoid
run: |
RECIPE='${{ matrix.recipe }}' LOCAL_REPO="${GITHUB_WORKSPACE}/src" make