Skip to content

Commit b997b48

Browse files
committed
Switch to GitHub Actions for CI
Closes #138
1 parent 007beaf commit b997b48

File tree

3 files changed

+34
-69
lines changed

3 files changed

+34
-69
lines changed

.circleci/config.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: ci
2+
on: [push]
3+
4+
jobs:
5+
fmt:
6+
runs-on: ubuntu-latest
7+
container: docker://nhooyr/websocket-ci@sha256:0953c32ff582cd22e036db0d1a3a58ced0d6cd3ea7efe8870a86939954a4f21f
8+
steps:
9+
- uses: actions/checkout@v1
10+
with:
11+
fetch-depth: 1
12+
- run: ./ci/fmt.sh
13+
lint:
14+
runs-on: ubuntu-latest
15+
container: docker://nhooyr/websocket-ci@sha256:0953c32ff582cd22e036db0d1a3a58ced0d6cd3ea7efe8870a86939954a4f21f
16+
steps:
17+
- uses: actions/checkout@v1
18+
with:
19+
fetch-depth: 1
20+
- run: ./ci/test.sh
21+
test:
22+
runs-on: ubuntu-latest
23+
container: docker://nhooyr/websocket-ci@sha256:0953c32ff582cd22e036db0d1a3a58ced0d6cd3ea7efe8870a86939954a4f21f
24+
steps:
25+
- uses: actions/checkout@v1
26+
with:
27+
fetch-depth: 1
28+
- run: ./ci/test.sh

ci/image/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ RUN apt-get update && \
1010
npm install -g prettier
1111

1212
RUN git config --global color.ui always
13+
14+
# Cache go modules.
15+
COPY . /tmp/websocket
16+
RUN cd /tmp/websocket && \
17+
go mod download && \
18+
rm -rf /tmp/websocket

0 commit comments

Comments
 (0)