Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Gammon <sam@elide.ventures>
  • Loading branch information
sgammon committed Mar 19, 2024
1 parent 2a2068d commit 3b1e541
Show file tree
Hide file tree
Showing 64 changed files with 13,667 additions and 1,849 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ lib/
dist/
node_modules/
coverage/
__tests__
src/model.ts
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.* @sgammon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CodeQL
name: 'Check: CodeQL'

on:
pull_request:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
# In TypeScript actions, `dist/` is a special directory. When you reference
# an action with the `uses:` property, `dist/index.js` is the code that will be
# run. For this project, the `dist/index.js` file is transpiled from other
# source files. This workflow ensures the `dist/` directory contains the
# expected transpiled code.
#
# If this workflow is run from a feature branch, it will act as an additional CI
# check and fail if the checked-in `dist/` directory does not match what is
# expected from the build.
name: Check Transpiled JavaScript
name: 'Check: Dist'

on:
pull_request:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint Codebase
name: 'Check: Lint'

on:
pull_request:
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/ci.build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: 'Build & Test'

on:
workflow_call: {}

permissions:
contents: read

jobs:
test-typescript:
name: TypeScript Tests
runs-on: ubuntu-latest

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: 'Setup: Node'
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: .node-version

- name: 'Setup: PNPM'
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: ${{ vars.PNPM_VERSION || '8.15.3' }}
run_install: |
- args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Check Format
id: npm-format-check
run: pnpm run format:check

- name: Lint
id: npm-lint
run: pnpm run lint

- name: Test
id: npm-ci-test
run: pnpm run ci-test

test-action:
name: GitHub Actions Test
runs-on: ubuntu-latest

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Test Local Action
id: test-action
uses: ./

- name: Print Output
id: output
run: echo "${{ steps.test-action.outputs.time }}"
28 changes: 12 additions & 16 deletions .github/workflows/ci.yml → .github/workflows/on.pr.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Continuous Integration
name: 'PR'

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

permissions:
contents: read
Expand All @@ -21,28 +18,29 @@ jobs:
id: checkout
uses: actions/checkout@v4

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
- name: 'Setup: Node'
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: .node-version
cache: npm

- name: Install Dependencies
id: npm-ci
run: npm ci
- name: 'Setup: PNPM'
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: ${{ vars.PNPM_VERSION || '8.15.3' }}
run_install: |
- args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Check Format
id: npm-format-check
run: npm run format:check
run: pnpm run format:check

- name: Lint
id: npm-lint
run: npm run lint
run: pnpm run lint

- name: Test
id: npm-ci-test
run: npm run ci-test
run: pnpm run ci-test

test-action:
name: GitHub Actions Test
Expand All @@ -56,8 +54,6 @@ jobs:
- name: Test Local Action
id: test-action
uses: ./
with:
milliseconds: 2000

- name: Print Output
id: output
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/on.push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: 'CI'

on:
push:
branches:
- main

permissions:
contents: read

jobs:
test-typescript:
name: TypeScript Tests
runs-on: ubuntu-latest

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: 'Setup: Node'
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: .node-version

- name: 'Setup: PNPM'
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: ${{ vars.PNPM_VERSION || '8.15.3' }}
run_install: |
- args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Check Format
id: npm-format-check
run: pnpm run format:check

- name: Lint
id: npm-lint
run: pnpm run lint

- name: Test
id: npm-ci-test
run: pnpm run ci-test

test-action:
name: GitHub Actions Test
runs-on: ubuntu-latest

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Test Local Action
id: test-action
uses: ./

- name: Print Output
id: output
run: echo "${{ steps.test-action.outputs.time }}"
3 changes: 0 additions & 3 deletions CODEOWNERS

This file was deleted.

Loading

0 comments on commit 3b1e541

Please sign in to comment.