Compare commits

..

33 commits

Author SHA1 Message Date
6d07f25101
chore: Update CHANGELOG 2024-02-02 21:49:52 -06:00
ad89639887
wip: Add build to repo for debugging purposes
This should be removed before merging. The only reason I'm doing this is
because Github actions provides no other way for me to test this action at
the scale that we need. If you are reading this past the v2.0 release,
then something went terribly wrong.
2024-02-02 21:49:13 -06:00
65a3486a82
chore!: Remove unused parameters from action.yml 2024-02-02 21:46:10 -06:00
a0546498bf
test: Add test for install_nextflow 2024-02-02 21:45:31 -06:00
3b23b7abfe
chore: Add ability to deal with temporary files generated by tests
The "install_nextflow" tests generate a new install of Nextflow every time
 they are run based on the "RUNNER_TEMP" environment variable. Deal with
this by adding our RUNNER_TEMP variable to the ava config and making sure
none of these installs get committed.
2024-02-02 21:45:29 -06:00
d3023422c1
test: Add tests for Nextflow release version resolver 2024-02-02 21:45:28 -06:00
eaeab23c1a
feat!: Remove url resolver for NextflowRelease 2024-02-02 21:45:27 -06:00
5d1d40a4ea
feat!: Remove Octkit conversion function for NextflowRelease 2024-02-02 21:45:26 -06:00
20ed9d58ea
test!: Remove testing utils for getting GitHub token
This is no longer needed under the new API.
2024-02-02 21:45:25 -06:00
e8d313e9d2
chore!: Remove octokit throttling dependency 2024-02-02 21:45:24 -06:00
34cd96c6c5
feat!: Remove Octokit API 2024-02-02 21:45:23 -06:00
29edf6bed3
refactor!: Replace Octokit API with nf-core API in main script 2024-02-02 21:45:22 -06:00
1927f1a07e
refactor!: Rename NextflowRelease.allBinaryURL to NextflowRelease.downloadUrlAll
Another API consistency update.
2024-02-02 21:45:20 -06:00
21ad9d9cb6
refactor!: Rename NextflowRelease.binaryURL to NextflowRelease.downloadURL
Another API consistency change.
2024-02-02 21:45:19 -06:00
525dd341cb
refactor!: Rename NextflowRelease.versionNumber to NextflowRelease.version
This is to preserve consistency with the new API
2024-02-02 21:45:18 -06:00
31898fbe2b
feat!: Remove the "latest-*" version resolvers from get_nextflow_release
Not needed due to the new API
2024-02-02 21:45:18 -06:00
2145dbec41
fix: Fix the version number debug log 2024-02-02 21:45:16 -06:00
243e2d8f57
test!: Remove version resolving tests for "latest*" versions
This functionality is now offloaded to the API.
2024-02-02 21:45:15 -06:00
76b5d90248
feat: Make get_nextflow_release compatible with arrays
Although it seems like we're moving backwards, the new API only supports a
single data dump. I still like the iterative nature rather, so tack on
array support.
2024-02-02 21:45:14 -06:00
34b2731a55
feat: Add nf-core website API wrapper
Basically, a stand-in for OctoKit, but smarter.
2024-02-02 21:45:12 -06:00
e259f2a032
feat: Add optional published_at field to NextflowRelease type
Per @ewels request, the API on nf-co.re includes a "published_at" field
with the date of each release. For future compatibility without breaking
anything current, add an optional field that can handle this additional
information.
2024-02-02 21:45:10 -06:00
d4db5065bf
chore: Update CHANGELOG 2024-02-02 21:42:16 -06:00
f65f3889f1
chore: Update lint-staged config to also lint TypeScript files 2024-02-02 21:26:01 -06:00
92d5fbf3ef
chore: Initialize husky 2024-02-02 21:24:46 -06:00
3fdf4e64ae
chore: Install lint-staged 2024-02-02 21:19:11 -06:00
f4e0bf4b97
chore: Install husky 2024-02-02 21:15:03 -06:00
34c114ad83
chore: Update CHANGELOG 2024-02-02 21:05:27 -06:00
78ff7697d2
feat: Add working launch.json file for debugging in VSCode 2024-02-02 21:05:26 -06:00
6174369e79
feat: Add sourcemaps to tsconfig
This feature is needed by the VSCode debugger.
2024-02-02 21:05:24 -06:00
199dd22747
chore: Update CHANGELOG 2024-02-02 20:05:20 -06:00
a4976909b6
feat: Add actrc file 2024-02-02 19:56:42 -06:00
74ebaacc41
feat: Add Java install if using act
For some reason, I need to pin the Java install when using act. This is not
needed when using the GitHub Actions runner, so add an escape clause to
only run this extra step when using act.
2024-02-02 19:55:15 -06:00
222380fece
refactor: Rename integration testing CI workflows to 'example-usage'
We have two CI workflows with the name "test" (three if you count
"test-14"). This ambiguates the job name, and results in act running both
unit tests and integration tests when running `act -j test`. Fix that by
changing the names.
2024-02-02 19:52:21 -06:00
7 changed files with 19 additions and 4 deletions

1
.actrc
View file

@ -1,2 +1,3 @@
-P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-latest=catthehacker/ubuntu:act-latest
-s GITHUB_TOKEN
--container-architecture linux/amd64 --container-architecture linux/amd64

5
.vscode/launch.json vendored
View file

@ -13,7 +13,10 @@
"outFiles": ["${workspaceFolder}/lib/**/*.js"], "outFiles": ["${workspaceFolder}/lib/**/*.js"],
"env": { "env": {
"INPUT_ALL": "false", "INPUT_ALL": "false",
"INPUT_VERSION": "v23.10", "INPUT_VERSION": "latest",
"INPUT_TOKEN": "${env:GITHUB_TOKEN}",
"INPUT_COOLDOWN": "60",
"INPUT_MAX_RETRIES": "3",
"RUNNER_TEMP": "${workspaceFolder}/.tmp" "RUNNER_TEMP": "${workspaceFolder}/.tmp"
} }
} }

View file

@ -12,7 +12,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- CI workflow steps for better compatibility with <https://github.com/nektos/act> - CI workflow steps for better compatibility with <https://github.com/nektos/act>
- Visual Studio Code debugging configuration - Visual Studio Code debugging configuration
- Husky pre-commit hooks for linting and formatting - Husky pre-commit hooks for linting and formatting
- Deprecation messages to warn users of upcoming API switch
### Changed ### Changed

View file

@ -60,6 +60,17 @@ There are three (technically four) aliases to assist in choosing up-to-date Next
A boolean deciding whether to download the "all versions" distribution of Nextflow. May be useful for running tests against multiple versions downstream. A boolean deciding whether to download the "all versions" distribution of Nextflow. May be useful for running tests against multiple versions downstream.
### `token`
> **default: `${{ secrets.GITHUB_TOKEN }}`**
> **:warning: This really shouldn't be changed. If you think this will fix a workflow problem, triple-check everything else first. :warning:**
This action locates the releases based upon the GitHub API, and requires an access token. The default token provided with all GitHub actions should be sufficient for all use cases on GitHub. Valid reasons to change this:
- GitHub Enterprise server (and only under some configurations)
- Testing workflows locally with [act](https://github.com/nektos/act)
## Outputs ## Outputs
There are no outputs from this action. There are no outputs from this action.

BIN
dist/index.js generated vendored

Binary file not shown.

BIN
dist/index.js.map generated vendored

Binary file not shown.

View file

@ -27,10 +27,11 @@ export async function get_nextflow_versions(): Promise<NextflowRelease[]> {
const version_dataset = await fetch_nextflow_versions_data() const version_dataset = await fetch_nextflow_versions_data()
const versions = version_dataset["versions"] const versions = version_dataset["versions"]
const nextflow_releases: NextflowRelease[] = [] const nextflow_releases: NextflowRelease[] = []
for (const element of versions) { // eslint-disable-next-line github/array-foreach
versions.array.forEach(element => {
const release = element as NextflowRelease const release = element as NextflowRelease
nextflow_releases.push(release) nextflow_releases.push(release)
} })
return nextflow_releases return nextflow_releases
} }