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

Update repository setup and tooling #298

Merged
merged 10 commits into from
Dec 6, 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
50 changes: 0 additions & 50 deletions .eslintrc.cjs

This file was deleted.

31 changes: 12 additions & 19 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,33 @@ on:
workflow_dispatch:
inputs:
version:
description: "Semver type of new version (major / minor / patch)"
description: "Type of version to bump"
required: true
type: choice
options:
- major
- minor
- patch

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
bump-version:
name: Bump version
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Setup Node.js
uses: actions/setup-node@v4

- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile

- uses: actions/setup-node@v4
with:
node-version: "16"
cache: "npm"
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Setup Git
run: |
node-version: "lts/*"

- run: |
git config user.name 'Sergio Xalambrí'
git config user.email '[email protected]'
- name: bump version
run: npm version ${{ github.event.inputs.version }}

- name: Push latest version
run: git push origin main --follow-tags
- run: npm version ${{ github.event.inputs.version }}
- run: git push origin main --follow-tags
93 changes: 28 additions & 65 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,86 +1,49 @@
name: CI

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]

concurrency:
group:
${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on: [push]

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

- name: Use Node LTS
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Build
run: npm run build
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run build

typecheck:
name: Typechecker
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run typecheck

- name: Use Node LTS
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Typecheck
run: npm run typecheck
quality:
name: Code Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run quality

test:
name: Unit and Integration Tests
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Use Node LTS
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Test
run: npm run test -- --coverage
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun test

lint:
name: Linter
exports:
name: Verify Exports
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Use Node LTS
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: Lint
run: npm run lint
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run exports
9 changes: 3 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,21 @@ on:
release:
types: [published]

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
publish-npm:
name: "Publish to npm"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun run build

- uses: actions/setup-node@v4
with:
node-version: "lts/*"
registry-url: https://registry.npmjs.org/

- run: npm install

- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
9 changes: 0 additions & 9 deletions .npmignore

This file was deleted.

Loading
Loading