Skip to content

Commit 17622bf

Browse files
authored
Merge pull request #237 from readthedocs/davidfischer/circleci-to-gha
Convert CircleCI to GitHub Actions
2 parents 69e941e + 0c92749 commit 17622bf

File tree

2 files changed

+57
-60
lines changed

2 files changed

+57
-60
lines changed

.circleci/config.yml

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

.github/workflows/main.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Continuous Integration Checks
2+
3+
# All branches
4+
on: push
5+
6+
jobs:
7+
checks:
8+
name: Linting
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Setup Node.js
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: "20"
16+
cache: "npm"
17+
- name: Install dependencies
18+
run: npm ci
19+
- name: Lint
20+
run: npm run lint
21+
22+
build:
23+
name: Build
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: "20"
31+
cache: "npm"
32+
- name: Install dependencies
33+
run: npm ci
34+
- name: Build
35+
run: npm run build
36+
- name: Ensure built assets are up to date
37+
run: |
38+
if [[ $(git status dist/ --porcelain) ]]; then
39+
echo "ERROR: assets are out of date. Make sure to run 'npm run build' on your branch."
40+
git status dist/ --porcelain
41+
exit 1
42+
fi
43+
44+
test:
45+
name: Tests
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v4
49+
- name: Setup Node.js
50+
uses: actions/setup-node@v4
51+
with:
52+
node-version: "20"
53+
cache: "npm"
54+
- name: Install dependencies
55+
run: npm ci
56+
- name: Run tests
57+
run: npm test

0 commit comments

Comments
 (0)