Skip to content

Commit

Permalink
wip: making compiler pass
Browse files Browse the repository at this point in the history
  • Loading branch information
CamiloGarciaLaRotta committed Feb 8, 2023
1 parent de160bc commit 8d4a34b
Show file tree
Hide file tree
Showing 11 changed files with 16,329 additions and 24,623 deletions.
7 changes: 2 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"plugin:github/typescript",
"eslint:recommended",
"plugin:eslint-comments/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
Expand All @@ -23,13 +22,11 @@
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-ignore": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "warn",
"@typescript-eslint/camelcase": "error",
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/naming-convention": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
- name: Get the sources
uses: actions/checkout@v3
- name: Restore the dependencies
run: npm ci
run: yarn install --frozen-lockfile
- name: Build and Test
run: npm run all
run: yarn run all
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# IDEs
.vscode/settings.json

# Dependency directory
node_modules

Expand Down
26 changes: 16 additions & 10 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@ import {Method} from 'axios'
import {run} from '../src/main'

describe('when running the action with valid inputs', () => {
jest.spyOn(http, 'request').mockImplementation(
(
url: string,
method: Method,
data?: string | undefined,
headers?: Object | undefined
): Promise<[number, Object, Object]> => {
return Promise.resolve([200, {some: 'response-headers'}, {some: 'JSON'}])
}
)
jest
.spyOn(http, 'request')
.mockImplementation(
(
url: string,
method: Method,
data?: string | undefined,
headers?: Object | undefined
): Promise<[number, Object, Object]> => {
return Promise.resolve([
200,
{some: 'response-headers'},
{some: 'JSON'}
])
}
)
const infoMock = jest.spyOn(Logger.prototype, 'info')
const outputMock = jest.spyOn(core, 'setOutput')

Expand Down
Loading

0 comments on commit 8d4a34b

Please sign in to comment.