-
Notifications
You must be signed in to change notification settings - Fork 8
188 lines (177 loc) · 5.94 KB
/
test.yml
File metadata and controls
188 lines (177 loc) · 5.94 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# Description:
# - Test Install Nu Pkgs
# REF:
# - https://github.com/marketplace/actions/checkout
# - https://gemfury.com/guide/alpine/configure-apk/
name: Test Install Nu Pkgs
on:
workflow_dispatch:
schedule:
- cron: '15 0 * * *' # run at 00:15 AM UTC
push:
branches:
- main
- develop
paths-ignore:
- '**.md'
jobs:
install-apk:
name: Install Nu apk
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
container:
image: alpine:latest
steps:
- name: Install Nushell APK
run: |
echo "https://alpine.fury.io/nushell/" | tee -a /etc/apk/repositories
apk update || true
# Use --allow-untrusted since the apk package is not signed currently
apk add --allow-untrusted nushell
cat /etc/shells
nu -c 'version'
install-rpm:
name: Install Nu rpm
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
image:
- fedora:latest
- fedora:41
- fedora:40
- fedora:39
- rockylinux:9
- rockylinux:8
- redhat/ubi10:latest
- redhat/ubi9:latest
- redhat/ubi8:latest
- almalinux:10
- almalinux:9
- almalinux:8
- openeuler/openeuler:25.03
- openeuler/openeuler:latest
- openeuler/openeuler:22.03-lts
runs-on: ${{ matrix.os }}
container:
image: ${{ matrix.image }}
steps:
- name: Test Install Nushell
run: |
echo "[nushell]
name=Nushell Repo
baseurl=https://yum.fury.io/nushell/
enabled=1
gpgcheck=0
gpgkey=https://yum.fury.io/nushell/gpg.key" | tee /etc/yum.repos.d/fury-nushell.repo
dnf install -y nushell
nu -c 'version'
- name: Checkout
uses: actions/checkout@v6
- name: Run Tests
run: nu nu/tests.nu
install-deb:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-22.04-arm, ubuntu-24.04, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
name: Install Nu deb@${{ matrix.os }}
steps:
- name: Test Install Nushell DEB Package
run: |
wget -qO- https://apt.fury.io/nushell/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/fury-nushell.gpg
echo "deb [signed-by=/etc/apt/keyrings/fury-nushell.gpg] https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury-nu.list
sudo apt update
sudo apt install nushell
nu -c 'version'
- name: Checkout
uses: actions/checkout@v6
- name: Run Tests
run: nu nu/tests.nu
install-on-arch:
name: Install Nu on Arch Linux
runs-on: ubuntu-24.04
container:
image: archlinux:latest
steps:
- name: Test Install Nushell
run: |
pacman -Sy --noconfirm wget
curl -s https://api.github.com/repos/nushell/integrations/releases/latest \
| grep browser_download_url | cut -d '"' -f 4 | grep x86_64.pkg.tar.zst \
| xargs wget -O nushell.pkg.tar.zst
pacman -U --noconfirm nushell.pkg.tar.zst
nu -c 'version'
- name: Checkout
uses: actions/checkout@v6
- name: Run Tests
run: nu nu/tests.nu
install-on-debian:
name: Install Nu deb
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
image:
- debian:trixie
- debian:bookworm
- debian:bullseye
runs-on: ${{ matrix.os }}
container:
image: ${{ matrix.image }}
steps:
- name: Test Install Nushell
run: |
# Disable SSL certificate checking for apt (not recommended for production!)
echo 'Acquire::https::Verify-Peer "false";' | tee /etc/apt/apt.conf.d/99insecure
echo 'Acquire::https::Verify-Host "false";' | tee -a /etc/apt/apt.conf.d/99insecure
# curl & gpg are not available in debian images, so we install without verifying the gpg key
# Add the repository with trusted=yes so that apt does not verify package signatures
echo "deb [trusted=yes] https://apt.fury.io/nushell/ /" | tee /etc/apt/sources.list.d/fury-nu.list
apt update
apt install nushell
nu -c 'version'
- name: Checkout
uses: actions/checkout@v6
- name: Run Tests
run: nu nu/tests.nu
install-deb-riscv:
name: Install Nu deb on RISC-V
strategy:
fail-fast: false
matrix:
image:
- ubuntu:24.04
- ubuntu:22.04
- debian:trixie
runs-on: ubuntu-24.04-arm
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: riscv64
- name: Checkout
uses: actions/checkout@v6
- name: Test Install Nu on RISC-V
run: |
docker pull --platform=linux/riscv64 ${{ matrix.image }}
# Create a script to run inside the container
cat > install-nu.sh << 'EOF'
# Disable SSL certificate checking for apt (not recommended for production!)
echo 'Acquire::https::Verify-Peer "false";' | tee /etc/apt/apt.conf.d/99insecure
echo 'Acquire::https::Verify-Host "false";' | tee -a /etc/apt/apt.conf.d/99insecure
# curl & gpg are not available in debian images, so we install without verifying the gpg key
# Add the repository with trusted=yes so that apt does not verify package signatures
echo "deb [trusted=yes] https://apt.fury.io/nushell/ /" | tee /etc/apt/sources.list.d/fury-nu.list
apt update
apt install nushell
nu -c 'version'
nu /work/nu/tests.nu
EOF
chmod +x install-nu.sh
# Run the container with QEMU emulation
docker run --platform=linux/riscv64 --rm -v $(pwd):/work ${{ matrix.image }} bash /work/install-nu.sh