Skip to content

Commit

Permalink
Remove local environment running
Browse files Browse the repository at this point in the history
This is a functionality that never worked perfectly and hasn't been
used for a while.

This allows developers to run the action on their local machine, but
the run was always flaky and never 100% mirrored what was happening on
the actions runner.
  • Loading branch information
aeisenberg committed Jun 2, 2021
1 parent 3708898 commit 2c2ebdc
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 262 deletions.
20 changes: 0 additions & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,6 @@ Only run `npm install` if you are explicitly changing the set of dependencies in

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.

### Running the action locally

It is possible to run this action locally via [act](https://github.com/nektos/act) via the following steps:

1. Create a GitHub [Personal Access Token](https://github.com/settings/tokens) (PAT).
1. Install [act](https://github.com/nektos/act) v0.2.10 or greater.
1. Add a `.env` file in the root of the project you are running:

```bash
CODEQL_LOCAL_RUN=true
GITHUB_SERVER_URL=https://github.com

# Optional, for better logging
GITHUB_JOB=<ANY_JOB_NAME>
```

1. Run `act -j codeql -s GITHUB_TOKEN=<PAT>`

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.

### Integration tests

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.
Expand Down
23 changes: 0 additions & 23 deletions lib/actions-util.js

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

2 changes: 1 addition & 1 deletion lib/actions-util.js.map

Large diffs are not rendered by default.

39 changes: 0 additions & 39 deletions lib/actions-util.test.js

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

2 changes: 1 addition & 1 deletion lib/actions-util.test.js.map

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions lib/api-client.js

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

2 changes: 1 addition & 1 deletion lib/api-client.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 lib/config-utils.js

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

2 changes: 1 addition & 1 deletion lib/config-utils.js.map

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions lib/util.js

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

Loading

0 comments on commit 2c2ebdc

Please sign in to comment.