Skip to content

Commit 4aae5ea

Browse files
committed
CI fixes
- Splits up test into fmt, lint and test - Fixes bug in build-packages.sh - Minor README.md fixes
1 parent 41d625a commit 4aae5ea

File tree

7 files changed

+62
-18
lines changed

7 files changed

+62
-18
lines changed

.github/workflows/ci.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@ name: ci
33
on: [push, pull_request]
44

55
jobs:
6+
fmt:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Run ./ci/steps/fmt.sh
11+
uses: ./ci/container
12+
with:
13+
args: ./ci/steps/fmt.sh
14+
15+
lint:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Run ./ci/steps/lint.sh
20+
uses: ./ci/container
21+
with:
22+
args: ./ci/steps/lint.sh
23+
624
test:
725
runs-on: ubuntu-latest
826
steps:

README.md

+1-13
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ sudo systemctl enable --now code-server
3838
```bash
3939
npm install -g code-server
4040
code-server
41+
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
4142
```
4243

4344
### macOS
@@ -48,19 +49,6 @@ brew service start code-server
4849
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
4950
```
5051

51-
### SSH
52-
53-
You can use [sshcode](https://github.com/codercom/sshcode) to start and use code-server on any Linux machine over SSH.
54-
55-
```bash
56-
57-
# Downloads and installs code-server on dev.coder.com and opens it in a new browser window.
58-
```
59-
60-
### Digital Ocean
61-
62-
[![Create a Droplet](./doc/assets/droplet.svg)](https://marketplace.digitalocean.com/apps/code-server)
63-
6452
### Docker
6553

6654
```bash

ci/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This directory contains scripts used for the development of code-server.
3131
- [./dev/container](./dev/container)
3232
- See [CONTRIBUTING.md](../doc/CONTRIBUTING.md) for docs on the development container
3333
- [./dev/ci.sh](./dev/ci.sh) (`yarn ci`)
34-
- Runs formatters, linters and tests
34+
- Runs `yarn fmt`, `yarn lint` and `yarn test`
3535
- [./dev/fmt.sh](./dev/fmt.sh) (`yarn fmt`)
3636
- Runs formatters
3737
- [./dev/lint.sh](./dev/lint.sh) (`yarn lint`)
@@ -106,8 +106,12 @@ This directory contains the container for CI.
106106
This directory contains a few scripts used in CI.
107107
Just helps avoid clobbering the CI configuration.
108108

109+
- [./steps/fmt.sh](./steps/fmt.sh)
110+
- Runs `yarn fmt` after ensuring VS Code is patched
111+
- [./steps/lint.sh](./steps/lint.sh)
112+
- Runs `yarn lint` after ensuring VS Code is patched
109113
- [./steps/test.sh](./steps/test.sh)
110-
- Runs `yarn ci` after ensuring VS Code is patched
114+
- Runs `yarn test` after ensuring VS Code is patched
111115
- [./steps/release.sh](./steps/release.sh)
112116
- Runs the full release process
113117
- Generates the npm package at `./release`

ci/build/build-packages.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ release_nfpm() {
5353
nfpm_config=$(envsubst < ./ci/build/nfpm.yaml)
5454

5555
# The underscores are convention for .deb.
56-
nfpm pkg -f <(echo "$nfpm_config") --target release-packages/code-server_"$VERSION_$ARCH.deb"
57-
nfpm pkg -f <(echo "$nfpm_config") --target release-packages/code-server-"$VERSION-$ARCH.rpm"
56+
nfpm pkg -f <(echo "$nfpm_config") --target "release-packages/code-server_${VERSION}_${ARCH}.deb"
57+
nfpm pkg -f <(echo "$nfpm_config") --target "release-packages/code-server-$VERSION-$ARCH.rpm"
5858
}
5959

6060
main "$@"

ci/steps/fmt.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
main() {
5+
cd "$(dirname "$0")/../.."
6+
7+
yarn
8+
9+
git submodule update --init
10+
# We do not `yarn vscode` to make test.sh faster.
11+
# If the patch fails to apply, then it's likely already applied
12+
yarn vscode:patch &> /dev/null || true
13+
14+
yarn fmt
15+
}
16+
17+
main "$@"

ci/steps/lint.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
main() {
5+
cd "$(dirname "$0")/../.."
6+
7+
yarn
8+
9+
git submodule update --init
10+
# We do not `yarn vscode` to make test.sh faster.
11+
# If the patch fails to apply, then it's likely already applied
12+
yarn vscode:patch &> /dev/null || true
13+
14+
yarn lint
15+
}
16+
17+
main "$@"

ci/steps/test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ main() {
1111
# If the patch fails to apply, then it's likely already applied
1212
yarn vscode:patch &> /dev/null || true
1313

14-
yarn ci
14+
yarn test
1515
}
1616

1717
main "$@"

0 commit comments

Comments
 (0)