Skip to content

Commit 9494a25

Browse files
Merge pull request #143 from github/update-v1-86081052
Merge main into v1
2 parents f0894d5 + 8608105 commit 9494a25

34 files changed

+322
-58
lines changed

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,25 @@ This project also includes configuration to run tests from VSCode (with support
2626

2727
To see the effect of your changes and to test them, push your changes in a branch and then look at the [Actions output](https://github.com/github/codeql-action/actions) for that branch. You can also exercise the code locally by running the automated tests.
2828

29+
### Running the action locally
30+
31+
It is possible to run this action locally via [act](https://github.com/nektos/act) via the following steps:
32+
33+
1. Create a GitHub [Personal Access Token](https://github.com/settings/tokens) (PAT).
34+
1. Install [act](https://github.com/nektos/act) v0.2.10 or greater.
35+
1. Add a `.env` file in the root of the project you are running:
36+
37+
```bash
38+
CODEQL_LOCAL_RUN=true
39+
40+
# Optional, for better logging
41+
GITHUB_JOB=<ANY_JOB_NAME>
42+
```
43+
44+
1. Run `act -j codeql -s GITHUB_TOKEN=<PAT>`
45+
46+
Running locally will generate the CodeQL database and run all the queries, but it will avoid uploading and reporting results to GitHub. Note that this must be done on a repository that _consumes_ this action, not this repository. The use case is to debug failures of this action on specific repositories.
47+
2948
### Integration tests
3049

3150
As well as the unit tests (see _Common tasks_ above), there are integration tests, defined in `.github/workflows/integration-testing.yml`. These are run by a CI check. Depending on the change you’re making, you may want to add a test to this file or extend an existing one.

lib/api-client.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api-client.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/autobuild.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/autobuild.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.js

Lines changed: 5 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/config-utils.js

Lines changed: 19 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)