Skip to content

Commit

Permalink
Basic integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed Nov 21, 2023
1 parent 3c8d0e2 commit e7a1b5d
Show file tree
Hide file tree
Showing 13 changed files with 228 additions and 221 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ dist/
lib/
node_modules/
tests/
__mocks__/

vite.config.ts
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# testing-farm-as-github-action

[![codecov][codecov-status]][codecov]

[codecov]: https://codecov.io/github/sclorg/testing-farm-as-github-action
[codecov-status]: https://codecov.io/github/sclorg/testing-farm-as-github-action/graph/badge.svg

Testing Farm as GitHub Action is a GitHub Action for executing tests on the [Testing Farm Service](https://docs.testing-farm.io).

The tests to run are to be described with a [`tmt` plan](https://tmt.readthedocs.io/en/latest/spec.html) by the user of this GitHub Action.
Expand Down
5 changes: 1 addition & 4 deletions dist/action.d.ts

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

6 changes: 2 additions & 4 deletions dist/action.js

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

2 changes: 1 addition & 1 deletion dist/action.js.map

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

6 changes: 2 additions & 4 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"prettier": "^3.0.3",
"ts-node": "^10.9.1",
"typescript": "^5.2.2",
"vitest": "^0.34.6",
"vitest-fetch-mock": "^0.2.2"
"vitest": "^0.34.6"
}
}
11 changes: 2 additions & 9 deletions src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,8 @@ import {
tmtEnvVarsSchema,
} from './schema/input';

async function action(
octokit: Octokit,
mock?: {
context: typeof context;
}
): Promise<void> {
const githubContext = mock?.context ?? context;

const pr = await PullRequest.initialize(githubContext.issue.number, octokit);
async function action(octokit: Octokit): Promise<void> {
const pr = await PullRequest.initialize(context.issue.number, octokit);

const tfInstance = getInput('api_url');

Expand Down
Loading

0 comments on commit e7a1b5d

Please sign in to comment.