Skip to content

Commit

Permalink
Update scripts to move /setup -> /
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed May 2, 2023
1 parent 0b3fc3f commit d98a6fb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ on:
- "**.md"
workflow_dispatch:

defaults:
run:
working-directory: setup

jobs:
test:
name: Unit Tests - ${{ matrix.os }}
Expand All @@ -27,7 +23,7 @@ jobs:
with:
node-version: "16"
cache: "npm"
cache-dependency-path: setup/package-lock.json
cache-dependency-path: package-lock.json
- run: npm ci --prefer-offline --no-audit --progress=false
- run: npm run bundle
- run: npm test
Expand Down Expand Up @@ -132,7 +128,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: ./setup
- uses: ./
with:
ghc-version: ${{ matrix.plan.ghc }}
ghcup-release-channel: ${{ matrix.ghcup_release_channel }}
Expand All @@ -150,15 +146,15 @@ jobs:
runghc __tests__/hello.hs
- name: Build test project
working-directory: setup/__tests__/project
working-directory: __tests__/project
run: cabal build

- name: Run test project
working-directory: setup/__tests__/project
working-directory: __tests__/project
run: cabal run

- name: Install test project
working-directory: setup/__tests__/project
working-directory: __tests__/project
run: cabal install

- name: Run installed test project
Expand All @@ -167,7 +163,7 @@ jobs:

- name: Build and run test with Hackage dependency
if: ${{ matrix.cabal_update != 'false' }}
working-directory: setup/__tests__/project-with-hackage-dependency
working-directory: __tests__/project-with-hackage-dependency
run: cabal build && cabal run

- name: Confirm installed and expected versions match
Expand All @@ -192,7 +188,7 @@ jobs:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: ./setup
- uses: ./
id: setup
env:
RUNNER_DEBUG: "1"
Expand All @@ -216,7 +212,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: ./setup
- uses: ./
id: setup
with:
enable-stack: true
Expand Down
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

cd setup || exit
npx --no-install lint-staged
1 change: 0 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

cd setup || exit
npm test
12 changes: 6 additions & 6 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
"**/!(*test).{ts,json}": [
"eslint --cache --fix",
() => "npm run bundle",
() => "git add setup/dist/ setup/lib/",
'**/!(*test).{ts,json}': [
'eslint --cache --fix',
() => 'npm run bundle',
() => 'git add dist/ lib/'
],
"**/*.ts": () => "tsc -p tsconfig.json",
"**/*.{js,ts,json,md}": "prettier --write",
'**/*.ts': () => 'tsc -p tsconfig.json',
'**/*.{js,ts,json,md}': 'prettier --write'
};

0 comments on commit d98a6fb

Please sign in to comment.