Skip to content

Commit

Permalink
cleanup and standardize output names
Browse files Browse the repository at this point in the history
Several breaking changes:

- Renamed `binPath` -> `bin-path`
- Renamed `version` -> `nimskull-version`
- Renamed `commit` -> `nimskull-commit`

Some fixes:

- Make sure to specify tool cache instead of "cache" as those are
  different from one another.
- Add Windows to test matrix.
- Marked important inputs as required, although defaults are still
  provided for them.
- Configured dependabot for npm.
  • Loading branch information
alaviss committed Jan 31, 2024
1 parent f6e8ade commit ca9e4b7
Show file tree
Hide file tree
Showing 13 changed files with 86 additions and 38,445 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist/** binary linguist-generated=true
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ updates:
schedule:
interval: "daily"

# Maintain dependencies for container images
- package-ecosystem: "docker"
directory: "/containers"
# Maintain dependencies for the action
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
1 change: 0 additions & 1 deletion .github/workflows/built.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
run: |
if ! git diff --exit-code -- dist; then
echo '::error::There are differences between commit and code built. Make sure that `npm run build` is run before commiting. Check log for more details.'
git diff -- dist
exit 1
fi
shell: bash
26 changes: 16 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,27 @@ on:

schedule:
# Run the check weekly so we can be sure that it still works
- cron: '0 0 * * 0'
- cron: "0 0 * * 0"

jobs:
check:
strategy:
matrix:
runner: [ubuntu-latest, macos-latest]
runner: [ubuntu-latest, macos-latest, windows-latest]
spec:
- 0.1.0-dev.20070
- '*'
- '>0.0.0'
- '>0.1.0-dev.20066 <0.1.0-dev.20074'
- 0.1.0-dev.21195
- "*"
- ">0.0.0"
- ">0.1.0-dev.20066 <0.1.0-dev.20074"
include:
- spec: 0.1.0-dev.20070
expect: 0.1.0-dev.20070
- spec: '>0.1.0-dev.20066 <0.1.0-dev.20074'
- spec: 0.1.0-dev.21195
expect: 0.1.0-dev.21195
- spec: ">0.1.0-dev.20066 <0.1.0-dev.20074"
expect: 0.1.0-dev.20072
exclude:
# Windows is not supported by this version
- runner: windows-latest
spec: ">0.1.0-dev.20066 <0.1.0-dev.20074"

name: Test installation for spec ${{ matrix.spec }} on ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}
Expand Down Expand Up @@ -64,7 +68,9 @@ jobs:

steps:
- name: Raise failure
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
if: |
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
run: |
echo "::error::There are failing required jobs"
exit 1
31 changes: 21 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,34 @@ description: Setup a Nimskull environment then add it to PATH
inputs:
token:
description: The Github token to retrieve data from nimskull repository
required: true
default: ${{ github.token }}
nimskull-version:
description: The semver specification for nimskull version to use. Defaults to any version
default: '*'
description:
The semver specification for nimskull version to use. Defaults to any
version
required: true
default: "*"
check-latest:
description: Whether to always check for the latest version satisfying the given spec. Defaults to true as nimskull is still in pre-alpha status.
default: true
description:
Whether to always check for the latest version satisfying the given spec.
Defaults to true as nimskull is still in pre-alpha status.
default: "true"
cache:
description:
Whether to use GitHub Actions cache. Useful when the compiler is not
downloaded
default: "true"
outputs:
path:
description: The resulting installation location
binPath:
bin-path:
description: Where binaries were installed
version:
description: The installed version
commit:
nimskull-version:
description: The installed nimskull version
nimskull-commit:
description: The commit of the compiler

runs:
using: 'node16'
main: 'dist/index.js'
using: "node20"
main: "dist/index.js"
Loading

0 comments on commit ca9e4b7

Please sign in to comment.