|
| 1 | +name: test installer.sh |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - "main" |
| 7 | + paths: |
| 8 | + - scripts/installer.sh |
| 9 | + pull_request: |
| 10 | + branches: |
| 11 | + - "*" |
| 12 | + paths: |
| 13 | + - scripts/installer.sh |
| 14 | + |
| 15 | +jobs: |
| 16 | + test: |
| 17 | + strategy: |
| 18 | + # Don't abort the entire matrix if one element fails. |
| 19 | + fail-fast: false |
| 20 | + # Don't start all of these at once, which could saturate Github workers. |
| 21 | + max-parallel: 4 |
| 22 | + matrix: |
| 23 | + image: |
| 24 | + # This is a list of Docker images against which we test our installer. |
| 25 | + # If you find that some of these no longer exist, please feel free |
| 26 | + # to remove them from the list. |
| 27 | + # When adding new images, please only use official ones. |
| 28 | + - "debian:oldstable-slim" |
| 29 | + - "debian:stable-slim" |
| 30 | + - "debian:testing-slim" |
| 31 | + - "debian:sid-slim" |
| 32 | + - "ubuntu:18.04" |
| 33 | + - "ubuntu:20.04" |
| 34 | + - "ubuntu:22.04" |
| 35 | + - "ubuntu:22.10" |
| 36 | + - "ubuntu:23.04" |
| 37 | + - "elementary/docker:stable" |
| 38 | + - "elementary/docker:unstable" |
| 39 | + - "parrotsec/core:lts-amd64" |
| 40 | + - "parrotsec/core:latest" |
| 41 | + - "kalilinux/kali-rolling" |
| 42 | + - "kalilinux/kali-dev" |
| 43 | + - "oraclelinux:9" |
| 44 | + - "oraclelinux:8" |
| 45 | + - "fedora:latest" |
| 46 | + - "rockylinux:8.7" |
| 47 | + - "rockylinux:9" |
| 48 | + - "amazonlinux:latest" |
| 49 | + - "opensuse/leap:latest" |
| 50 | + - "opensuse/tumbleweed:latest" |
| 51 | + - "archlinux:latest" |
| 52 | + - "alpine:3.14" |
| 53 | + - "alpine:latest" |
| 54 | + - "alpine:edge" |
| 55 | + deps: |
| 56 | + # Run all images installing curl as a dependency. |
| 57 | + - curl |
| 58 | + include: |
| 59 | + # Check a few images with wget rather than curl. |
| 60 | + - { image: "debian:oldstable-slim", deps: "wget" } |
| 61 | + - { image: "debian:sid-slim", deps: "wget" } |
| 62 | + - { image: "ubuntu:23.04", deps: "wget" } |
| 63 | + # Ubuntu 16.04 also needs apt-transport-https installed. |
| 64 | + - { image: "ubuntu:16.04", deps: "curl apt-transport-https" } |
| 65 | + - { image: "ubuntu:16.04", deps: "wget apt-transport-https" } |
| 66 | + runs-on: ubuntu-latest |
| 67 | + container: |
| 68 | + image: ${{ matrix.image }} |
| 69 | + options: --user root |
| 70 | + steps: |
| 71 | + - name: install dependencies (yum) |
| 72 | + # tar and gzip are needed by the actions/checkout below. |
| 73 | + run: yum install -y --allowerasing tar gzip ${{ matrix.deps }} |
| 74 | + if: | |
| 75 | + contains(matrix.image, 'centos') |
| 76 | + || contains(matrix.image, 'oraclelinux') |
| 77 | + || contains(matrix.image, 'fedora') |
| 78 | + || contains(matrix.image, 'amazonlinux') |
| 79 | + - name: install dependencies (zypper) |
| 80 | + # tar and gzip are needed by the actions/checkout below. |
| 81 | + run: zypper --non-interactive install tar gzip |
| 82 | + if: contains(matrix.image, 'opensuse') |
| 83 | + - name: install dependencies (apt-get) |
| 84 | + run: | |
| 85 | + apt-get update |
| 86 | + apt-get install -y ${{ matrix.deps }} |
| 87 | + if: | |
| 88 | + contains(matrix.image, 'debian') |
| 89 | + || contains(matrix.image, 'ubuntu') |
| 90 | + || contains(matrix.image, 'elementary') |
| 91 | + || contains(matrix.image, 'parrotsec') |
| 92 | + || contains(matrix.image, 'kalilinux') |
| 93 | + - name: checkout |
| 94 | + uses: actions/checkout@v3 |
| 95 | + - name: run installer |
| 96 | + run: scripts/installer.sh |
| 97 | + # Package installation can fail in docker because systemd is not running |
| 98 | + # as PID 1, so ignore errors at this step. The real check is the |
| 99 | + # `tailscale --version` command below. |
| 100 | + continue-on-error: true |
| 101 | + - name: check tailscale version |
| 102 | + run: tailscale --version |
0 commit comments