Skip to content

Commit

Permalink
Setup CI with the new build system
Browse files Browse the repository at this point in the history
  • Loading branch information
MangelMaxime committed Dec 28, 2023
1 parent 819cd69 commit 9dd9c5b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]
},
"fantomas": {
"version": "6.2.3",
"version": "6.3.0-alpha-005",
"commands": [
"fantomas"
]
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ jobs:

- name: Tests
run: |
pnpm install
dotnet tool restore
dotnet fable src/Glutinum.Converter --outDir fableBuild --sourceMaps --run vitest run
./build.sh lint
./build.sh test
6 changes: 6 additions & 0 deletions src/Glutinum.Build/Main.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Available commands:
Options for all except integration and standalone:
--watch Watch for changes and re-run the tests
lint Run the linter on the source code
format Format the source code
publish Publish the different packages to NuGet and NPM
based on the CHANGELOG.md files
If the last version in the CHANGELOG.md is
Expand All @@ -33,6 +37,8 @@ let main argv =
match argv with
| "test" :: args -> Test.Specs.handle args
| "publish" :: args -> Publish.handle args
| "lint" :: _ -> Command.Run("dotnet", "fantomas --check src")
| "format" :: _ -> Command.Run("dotnet", "fantomas src")
| "help" :: _
| "--help" :: _
| _ -> printHelp ()
Expand Down
3 changes: 3 additions & 0 deletions src/Glutinum.Build/Test/Specs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ module Build.Test.Specs

open BlackFox.CommandLine
open SimpleExec
open Build.Utils.Pnpm

let handle (args: string list) =
let isWatch = args |> List.contains "--watch"

Pnpm.install ()

let vitestCmd =
CmdLine.empty
|> CmdLine.appendRaw "npx"
Expand Down

0 comments on commit 9dd9c5b

Please sign in to comment.