Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-implement Action in TypeScript #45

Merged
merged 6 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on:
pull_request:
push:
branches: main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: yarn
node-version-file: '.nvmrc'
- run: yarn install
- run: yarn build
- run: yarn test
32 changes: 0 additions & 32 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ jobs:
- resolver: lts
- resolver: lts-22.7
ghc: "9.6.4"
- resolver: lts-20.2
ghc: "9.2.5"
- resolver: lts-19.33
ghc: "9.0.2"
- resolver: lts-18.28
ghc: "8.10.7"
- resolver: lts-16.31
ghc: "8.8.4"
- resolver: lts-12.26
ghc: "8.4.4"

Expand All @@ -49,7 +41,6 @@ jobs:
with:
working-directory: example
stack-arguments: --resolver ${{ matrix.stack.resolver }}
cache-prefix: ${{ matrix.stack.resolver }}/

- name: Check compiler[-*] outputs
if: matrix.stack.ghc
Expand Down Expand Up @@ -114,26 +105,3 @@ jobs:
with:
working-directory: example
stack-yaml: ${{ matrix.stack-yaml }}

test-auto-nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: stack
uses: ./
with:
working-directory: example
stack-yaml: stack-nightly.yaml
cache-prefix: auto-nightly/

test-auto-nightly-with-explicit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: stack
uses: ./
with:
working-directory: example
stack-yaml: stack-nightly.yaml
stack-arguments: --resolver nightly
cache-prefix: auto-nightly-explicit/
18 changes: 18 additions & 0 deletions .github/workflows/mergeabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Mergeabot

on:
pull_request:
schedule:
- cron: "0 0 * * *"

permissions:
contents: write
pull-requests: write

jobs:
mergeabot:
runs-on: ubuntu-latest
steps:
- uses: freckle/mergeabot-action@v1
with:
quarantine-days: -1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
lib
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
13 changes: 13 additions & 0 deletions .restyled.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
restylers:
- clang-format:
enabled: false
- jq:
enabled: false # prefer prettier-json
- prettier:
include:
- "src/**/*.ts"
- whitespace:
include:
- "**/*"
- "!dist/index.js"
- "*"
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:

| name | description | required | default |
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------- |
| `working-directory` | <p>Working directory for run commands</p> | `false` | `.` |
| `working-directory` | <p>Working directory for run commands</p> | `false` | `""` |
| `stack-yaml` | <p>Override stack.yaml, relative to working-directory</p> | `false` | `stack.yaml` |
| `test` | <p>Whether to run tests</p> | `false` | `true` |
| `stack-arguments` | <p>Additional arguments for all top-level <code>stack</code> command invocations.</p> | `false` | `--no-terminal` |
Expand All @@ -84,8 +84,6 @@ jobs:

<!-- action-docs-inputs action="action.yml" -->

<!-- action-docs-outputs action="action.yml" -->

## Outputs

| name | description |
Expand Down Expand Up @@ -115,8 +113,6 @@ jobs:
| `dist-dir` | <p><code>dist-dir</code> value from <code>stack path</code></p> |
| `local-hpc-root` | <p><code>local-hpc-root</code> value from <code>stack path</code></p> |

<!-- action-docs-outputs action="action.yml" -->

## Generating a Build Matrix of `stack.yaml`s

The following automatically discovers all files matching `stack*.yaml` and runs
Expand Down
Loading
Loading