Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move core of CI to GitHub #32

Merged
merged 7 commits into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check that everything builds correctly

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
test-building:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
- run: npm ci

- name: Build package
run: npm run lib

- name: Build website
run: npm run build

- name: Build docs
run: |
cd docs
npm ci
npm run build
31 changes: 31 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Run static checks

on:
push:
pull_request:
workflow_dispatch:

jobs:
run-static-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
- run: npm ci

- name: Check formatting with prettier
run: npm run prettier:check

- name: Check for issues with eslint
run: npm run lint

- name: Check for type errors with typescript
run: npm run tsc

- name: Run unit tests
run: npm run test
22 changes: 18 additions & 4 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,28 @@ name: Submit to coveralls

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
test:
submit-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
- run: npm ci
- run: npm run coverage
- uses: coverallsapp/github-action@v2

- name: Test
run: npm run coverage

- name: Submit
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish NPM Package

on:
push:
branches:
- publish
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
- run: npm ci

- name: Build package
run: npm run lib

- name: Publish package
env:
NODE_AUTH_TOKEN: '${{ secrets.NPM_PUBLISH_TOKEN }}'
run: npm publish
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ set programming.

- Dusa lives online at [dusa.rocks](https://dusa.rocks/).
- Documentation lives at [dusa.rocks/docs](https://dusa.rocks/docs/)
- [Source code at sourcehut](https://git.sr.ht/~robsimmons/dusa)
- [Issue tracker at sourcehut](https://todo.sr.ht/~robsimmons/Dusa)
- [Source code on GitHub](https://github.com/robsimmons/dusa)
- [Issue tracker at GitHub](https://github.com/robsimmons/dusa/issues)

Dusa was initially developed by Rob Simmons and Chris Martens while Rob attended
[Recurse Center](https://www.recurse.com/) in Fall 2023. Recurse center is a
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dusa",
"version": "0.0.13",
"version": "0.0.14",
"type": "module",
"main": "lib/client.js",
"types": "lib/client.d.ts",
Expand Down
Loading