Archived
1
0
- Splits up test into fmt, lint and test
- Fixes bug in build-packages.sh
- Minor README.md fixes
This commit is contained in:
Anmol Sethi 2020-05-12 19:33:34 -04:00
parent 41d625abb6
commit 4aae5eaeca
No known key found for this signature in database
GPG Key ID: 8CEF1878FF10ADEB
7 changed files with 62 additions and 18 deletions

View File

@ -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:

View File

@ -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

View File

@ -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`

View File

@ -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 "$@"

17
ci/steps/fmt.sh Executable file
View File

@ -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 "$@"

17
ci/steps/lint.sh Executable file
View File

@ -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 "$@"

View File

@ -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 "$@"