diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f20b60f3..c2a97ddd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,6 +3,24 @@ name: ci on: [push, pull_request] jobs: + fmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Run ./ci/steps/fmt.sh + uses: ./ci/container + with: + args: ./ci/steps/fmt.sh + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Run ./ci/steps/lint.sh + uses: ./ci/container + with: + args: ./ci/steps/lint.sh + test: runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index 7cd16946..a0f5e6b1 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ sudo systemctl enable --now code-server ```bash npm install -g code-server code-server +# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml ``` ### macOS @@ -48,19 +49,6 @@ brew service start code-server # Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml ``` -### SSH - -You can use [sshcode](https://github.com/codercom/sshcode) to start and use code-server on any Linux machine over SSH. - -```bash -sshcode user@dev.coder.com -# Downloads and installs code-server on dev.coder.com and opens it in a new browser window. -``` - -### Digital Ocean - -[![Create a Droplet](./doc/assets/droplet.svg)](https://marketplace.digitalocean.com/apps/code-server) - ### Docker ```bash diff --git a/ci/README.md b/ci/README.md index b0954524..b2539f8f 100644 --- a/ci/README.md +++ b/ci/README.md @@ -31,7 +31,7 @@ This directory contains scripts used for the development of code-server. - [./dev/container](./dev/container) - See [CONTRIBUTING.md](../doc/CONTRIBUTING.md) for docs on the development container - [./dev/ci.sh](./dev/ci.sh) (`yarn ci`) - - Runs formatters, linters and tests + - Runs `yarn fmt`, `yarn lint` and `yarn test` - [./dev/fmt.sh](./dev/fmt.sh) (`yarn fmt`) - Runs formatters - [./dev/lint.sh](./dev/lint.sh) (`yarn lint`) @@ -106,8 +106,12 @@ This directory contains the container for CI. This directory contains a few scripts used in CI. Just helps avoid clobbering the CI configuration. +- [./steps/fmt.sh](./steps/fmt.sh) + - Runs `yarn fmt` after ensuring VS Code is patched +- [./steps/lint.sh](./steps/lint.sh) + - Runs `yarn lint` after ensuring VS Code is patched - [./steps/test.sh](./steps/test.sh) - - Runs `yarn ci` after ensuring VS Code is patched + - Runs `yarn test` after ensuring VS Code is patched - [./steps/release.sh](./steps/release.sh) - Runs the full release process - Generates the npm package at `./release` diff --git a/ci/build/build-packages.sh b/ci/build/build-packages.sh index 6eb93c54..dc7f6168 100755 --- a/ci/build/build-packages.sh +++ b/ci/build/build-packages.sh @@ -53,8 +53,8 @@ release_nfpm() { nfpm_config=$(envsubst < ./ci/build/nfpm.yaml) # The underscores are convention for .deb. - nfpm pkg -f <(echo "$nfpm_config") --target release-packages/code-server_"$VERSION_$ARCH.deb" - nfpm pkg -f <(echo "$nfpm_config") --target release-packages/code-server-"$VERSION-$ARCH.rpm" + nfpm pkg -f <(echo "$nfpm_config") --target "release-packages/code-server_${VERSION}_${ARCH}.deb" + nfpm pkg -f <(echo "$nfpm_config") --target "release-packages/code-server-$VERSION-$ARCH.rpm" } main "$@" diff --git a/ci/steps/fmt.sh b/ci/steps/fmt.sh new file mode 100755 index 00000000..f7b1bbb8 --- /dev/null +++ b/ci/steps/fmt.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -euo pipefail + +main() { + cd "$(dirname "$0")/../.." + + yarn + + git submodule update --init + # We do not `yarn vscode` to make test.sh faster. + # If the patch fails to apply, then it's likely already applied + yarn vscode:patch &> /dev/null || true + + yarn fmt +} + +main "$@" diff --git a/ci/steps/lint.sh b/ci/steps/lint.sh new file mode 100755 index 00000000..c58473fb --- /dev/null +++ b/ci/steps/lint.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -euo pipefail + +main() { + cd "$(dirname "$0")/../.." + + yarn + + git submodule update --init + # We do not `yarn vscode` to make test.sh faster. + # If the patch fails to apply, then it's likely already applied + yarn vscode:patch &> /dev/null || true + + yarn lint +} + +main "$@" diff --git a/ci/steps/test.sh b/ci/steps/test.sh index 9430d107..73c3520d 100755 --- a/ci/steps/test.sh +++ b/ci/steps/test.sh @@ -11,7 +11,7 @@ main() { # If the patch fails to apply, then it's likely already applied yarn vscode:patch &> /dev/null || true - yarn ci + yarn test } main "$@"