2021-07-02 20:18:37 +02:00
|
|
|
name: Installer integration
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
2021-10-29 21:48:21 +02:00
|
|
|
- "install.sh"
|
2022-09-23 02:15:26 +02:00
|
|
|
- ".github/workflows/installer.yaml"
|
2021-07-02 20:18:37 +02:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-10-29 21:48:21 +02:00
|
|
|
paths:
|
|
|
|
- "install.sh"
|
2022-09-23 02:15:26 +02:00
|
|
|
- ".github/workflows/installer.yaml"
|
2021-07-02 20:18:37 +02:00
|
|
|
|
2022-03-02 00:03:39 +01:00
|
|
|
# Cancel in-progress runs for pull requests when developers push
|
|
|
|
# additional changes, and serialize builds in branches.
|
|
|
|
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
|
2022-04-12 20:59:11 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-07-02 20:18:37 +02:00
|
|
|
jobs:
|
|
|
|
ubuntu:
|
|
|
|
name: Test installer on Ubuntu
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2022-03-02 00:31:32 +01:00
|
|
|
uses: actions/checkout@v3
|
2021-07-02 20:18:37 +02:00
|
|
|
|
|
|
|
- name: Install code-server
|
|
|
|
run: ./install.sh
|
|
|
|
|
2022-09-23 02:15:26 +02:00
|
|
|
- name: Test code-server was installed globally
|
|
|
|
run: code-server --help
|
2021-07-02 20:18:37 +02:00
|
|
|
|
2021-07-03 02:19:23 +02:00
|
|
|
alpine:
|
|
|
|
name: Test installer on Alpine
|
|
|
|
runs-on: ubuntu-latest
|
2022-08-09 00:32:43 +02:00
|
|
|
container: "alpine:3.16"
|
2021-07-03 02:19:23 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2022-03-02 00:31:32 +01:00
|
|
|
uses: actions/checkout@v3
|
2021-07-03 02:19:23 +02:00
|
|
|
|
|
|
|
- name: Install curl
|
|
|
|
run: apk add curl
|
|
|
|
|
|
|
|
- name: Add user
|
|
|
|
run: adduser coder --disabled-password
|
|
|
|
|
|
|
|
# Standalone should work without root.
|
|
|
|
- name: Test standalone to a non-existent prefix
|
|
|
|
run: su coder -c "./install.sh --method standalone --prefix /tmp/does/not/yet/exist"
|
|
|
|
|
2022-09-23 02:15:26 +02:00
|
|
|
# We do not actually have Alpine standalone builds so running code-server
|
|
|
|
# will not work.
|
|
|
|
- name: Test code-server was installed to prefix
|
|
|
|
run: test -f /tmp/does/not/yet/exist/bin/code-server
|
|
|
|
|
2021-07-02 20:18:37 +02:00
|
|
|
macos:
|
|
|
|
name: Test installer on macOS
|
|
|
|
runs-on: macos-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2022-03-02 00:31:32 +01:00
|
|
|
uses: actions/checkout@v3
|
2021-07-02 20:18:37 +02:00
|
|
|
|
|
|
|
- name: Install code-server
|
|
|
|
run: ./install.sh
|
|
|
|
|
2022-09-23 02:15:26 +02:00
|
|
|
- name: Test code-server was installed globally
|
|
|
|
run: code-server --help
|