Skip to content

Commit

Permalink
Merge branch 'main' into fix-readme-error
Browse files Browse the repository at this point in the history
  • Loading branch information
dslatkin authored Jan 22, 2024
2 parents fc0fe14 + 60a0d83 commit 92d37e8
Showing 42 changed files with 37,253 additions and 15,053 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ extends:
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
- prettier/@typescript-eslint
- prettier
parserOptions:
project: ['tsconfig.eslint.json']
rules:
12 changes: 12 additions & 0 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Install dependencies'
description: 'Set up node and install dependencies'
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v3
with:
node-version: '20.x'
cache: npm

- run: npm ci
shell: bash
9 changes: 1 addition & 8 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -20,14 +20,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm

- name: Install dependencies
run: npm ci
- uses: ./.github/actions/install-dependencies

- name: Rebuild the dist/ directory
run: npm run build
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -11,10 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- run: npm ci
- uses: ./.github/actions/install-dependencies
- run: npm run style:check
- run: npm test
111 changes: 83 additions & 28 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -50,12 +50,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
restore-keys: ${{runner.os}}-npm-
- run: npm ci
- uses: ./.github/actions/install-dependencies
- id: npm-require
uses: ./
with:
@@ -71,23 +66,18 @@ jobs:
echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY
test-previews:
name: 'Integration test: previews option'
name: 'Integration test: GraphQL previews option'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
restore-keys: ${{runner.os}}-npm-
- run: npm ci
- uses: ./.github/actions/install-dependencies
- id: previews-default
name: Default previews not set
uses: ./
with:
script: |
const endpoint = github.request.endpoint
return endpoint({}).headers.accept
return endpoint({url: "/graphql"}).headers.accept
result-encoding: string
- id: previews-set-single
name: Previews set to a single value
@@ -96,7 +86,7 @@ jobs:
previews: foo
script: |
const endpoint = github.request.endpoint
return endpoint({}).headers.accept
return endpoint({url: "/graphql"}).headers.accept
result-encoding: string
- id: previews-set-multiple
name: Previews set to comma-separated list
@@ -105,7 +95,7 @@ jobs:
previews: foo,bar,baz
script: |
const endpoint = github.request.endpoint
return endpoint({}).headers.accept
return endpoint({url: "/graphql"}).headers.accept
result-encoding: string
- run: |
echo "- Validating previews default"
@@ -133,12 +123,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
restore-keys: ${{runner.os}}-npm-
- run: npm ci
- uses: ./.github/actions/install-dependencies
- id: user-agent-default
name: Default user-agent not set
uses: ./
@@ -195,12 +180,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
restore-keys: ${{runner.os}}-npm-
- run: npm ci
- uses: ./.github/actions/install-dependencies
- id: debug-default
name: Default debug not set
uses: ./
@@ -268,3 +248,78 @@ jobs:
done <<< "$tests"
echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY
test-base-url:
name: 'Integration test: base-url option'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-dependencies

- id: base-url-default
name: API URL with base-url not set
uses: ./
with:
script: |
const endpoint = github.request.endpoint
return endpoint({}).url
result-encoding: string

- id: base-url-default-graphql
name: GraphQL URL with base-url not set
uses: ./
with:
script: |
const endpoint = github.request.endpoint
return endpoint({url: "/graphql"}).url
result-encoding: string

- id: base-url-set
name: API URL with base-url set
uses: ./
with:
base-url: https://my.github-enterprise-server.com/api/v3
script: |
const endpoint = github.request.endpoint
return endpoint({}).url
result-encoding: string

- id: base-url-set-graphql
name: GraphQL URL with base-url set
uses: ./
with:
base-url: https://my.github-enterprise-server.com/api/v3
script: |
const endpoint = github.request.endpoint
return endpoint({url: "/graphql"}).url
result-encoding: string

- run: |
echo "- Validating API URL default"
expected="https://api.github.com/"
actual="${{steps.base-url-default.outputs.result}}"
if [[ "$expected" != "$actual" ]]; then
echo $'::error::\u274C' "Expected base-url to equal '$expected', got $actual"
exit 1
fi
echo "- Validating GraphQL URL default"
expected="https://api.github.com/graphql"
actual="${{steps.base-url-default-graphql.outputs.result}}"
if [[ "$expected" != "$actual" ]]; then
echo $'::error::\u274C' "Expected base-url to equal '$expected', got $actual"
exit 1
fi
echo "- Validating base-url set to a value"
expected="https://my.github-enterprise-server.com/api/v3/"
actual="${{steps.base-url-set.outputs.result}}"
if [[ "$expected" != "$actual" ]]; then
echo $'::error::\u274C' "Expected base-url to equal '$expected', got $actual"
exit 1
fi
echo "- Validating GraphQL URL with base-url set to a value"
expected="https://my.github-enterprise-server.com/api/v3/graphql"
actual="${{steps.base-url-set-graphql.outputs.result}}"
if [[ "$expected" != "$actual" ]]; then
echo $'::error::\u274C' "Expected base-url to equal '$expected', got $actual"
exit 1
fi
2 changes: 1 addition & 1 deletion .github/workflows/licensed.yml
Original file line number Diff line number Diff line change
@@ -20,5 +20,5 @@ jobs:
- uses: jonabc/setup-licensed@82c5f4d19e8968efa74a25b132922382c2671fe2
with:
version: '3.x'
- run: npm ci
- uses: ./.github/actions/install-dependencies
- run: licensed status
2 changes: 1 addition & 1 deletion .licenses/npm/@actions/core.dep.yml

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

2 changes: 1 addition & 1 deletion .licenses/npm/@actions/exec.dep.yml

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

2 changes: 1 addition & 1 deletion .licenses/npm/@actions/github.dep.yml

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

2 changes: 1 addition & 1 deletion .licenses/npm/@actions/glob.dep.yml

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

36 changes: 18 additions & 18 deletions .licenses/npm/@actions/http-client.dep.yml

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

2 changes: 1 addition & 1 deletion .licenses/npm/@actions/io.dep.yml

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

30 changes: 30 additions & 0 deletions .licenses/npm/@fastify/busboy.dep.yml

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

4 changes: 2 additions & 2 deletions .licenses/npm/@octokit/auth-token.dep.yml

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

4 changes: 2 additions & 2 deletions .licenses/npm/@octokit/core.dep.yml

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

4 changes: 2 additions & 2 deletions .licenses/npm/@octokit/endpoint.dep.yml

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

4 changes: 2 additions & 2 deletions .licenses/npm/@octokit/graphql.dep.yml

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

Loading
Oops, something went wrong.

0 comments on commit 92d37e8

Please sign in to comment.