tests #321
This file contains 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: tests | |
on: workflow_dispatch | |
jobs: | |
test: | |
runs-on: | |
# group: nixgroup | |
labels: nixos | |
name: NixOS Testes | |
steps: | |
- name: checkout PR merge commit | |
uses: actions/checkout@v4 | |
with: | |
# Nix Flakes doesn't work on shallow clones | |
fetch-depth: 0 | |
- name: Recolhe info | |
run: | | |
id | |
pwd | |
ls -la /nix/store | grep hello | |
echo "${PATH//:/$'\n'}" | |
- name: Recolhe info show-config | |
run: | | |
nix show-config | |
- name: Testa ping | |
run: | | |
python --version | |
stat -c '%a %n' $(which ping) | |
stat -c '%a %n' $(readlink -f $(which ping)) | |
# /run/current-system/sw/bin/ping -c3 8.8.8.8 # Funciona tb, mas comentado para poupar um pouco de tempo. | |
ping -c3 8.8.8.8 | |
- name: profile install hello test | |
run: | | |
nix profile install nixpkgs#hello | |
echo "${PATH//:/$'\n'}" | |
nix profile list | |
# ls -alh "$HOME"/.nix-profile | |
# ls -alh "$HOME"/.nix-profile/ | |
ls -alh /nix/var/nix/profiles/per-user/nixuser/profile | |
ls -alh /nix/var/nix/profiles/per-user/nixuser/profile/bin | |
hello | |
- name: profile install node test | |
run: | | |
nix profile install nixpkgs#nodejs | |
echo "${PATH//:/$'\n'}" | |
nix profile list | |
node --version | |
- name: Testa hostname | |
run: | | |
hostname | |
hostname a1b2c3 | |
hostname | |
hostname nixos | |
hostname | |
- name: Testa podman | |
run: | | |
cat /proc/sys/user/max_user_namespaces | |
cat /proc/self/uid_map | |
grep /run /proc/self/mountinfo | |
cat /etc/subuid | |
cat /etc/subgid | |
ls -l /run/wrappers/bin/newuidmap | |
ls -l /run/wrappers/bin/newuidmap | |
stat -c '%a %n' /run/wrappers/bin/newuidmap | |
stat -c '%a %n' /run/wrappers/bin/newgidmap | |
podman unshare cat /proc/self/uid_map /proc/self/gid_map | |
podman images | |
# podman --log-level debug info | |
# podman network ls | |
# podman pull alpine | |
# podman run --rm alpine cat /etc/os-release | |
# podman images | |
- name: Testa sudo | |
run: | | |
stat -c '%a %n' $(which sudo) | |
stat -c '%a %n' $(readlink -f $(which sudo)) | |
stat -c '%a %n' /run/wrappers/bin/sudo | |
stat -c '%a %n' /run/current-system/sw/bin/sudo | |
echo 12345 | |
sudo id | |
/run/wrappers/bin/sudo id | |
/run/current-system/sw/bin/sudo id |