This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deploy: | |
cmd: netlify deploy --prod --dir=./build --site="$NETLIFY_SITE_ID" --auth="$NETLIFY_AUTH_TOKEN" | |
dependson: | |
- build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Deploy todoapp | |
deploy: netlify.#Deploy & { | |
contents: actions.build.output | |
site: string | *"dagger-todoapp" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build: | |
input: |- | |
* | |
!build | |
!*.cue | |
!*.md | |
cmd: yarn run build | |
target: ./build | |
dependencies: | |
- yarn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source: core.#Source & { | |
path: "." | |
exclude: [ | |
"node_modules", | |
"build", | |
"*.cue", | |
"*.md", | |
".git", | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variables: | |
NETLIFY_SITE_ID: 11718535-163d-4092-90e3-2b05b23111af | |
build: | |
build: | |
input: |- | |
* | |
!*.cue | |
!*.md | |
cmd: yarn run build | |
target: ./build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package todoapp | |
import ( | |
"dagger.io/dagger" | |
"dagger.io/dagger/core" | |
"universe.dagger.io/netlify" | |
"universe.dagger.io/yarn" | |
) | |
dagger.#Plan & { | |
actions: { | |
// Load the todoapp source code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
check: | |
rebuild: always | |
dependson: | |
- vet | |
- fmt | |
- testRace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run tests and linters | |
func Check() { | |
if runtime.GOARCH == "amd64" && runtime.GOOS != "darwin" { | |
mg.Deps(Test386) | |
} else { | |
fmt.Printf("Skip Test386 on %s and/or %s\n", runtime.GOARCH, runtime.GOOS) | |
} | |
mg.Deps(Fmt, Vet) | |
// don't run two tests in parallel, they saturate the CPUs anyway, and running two | |
// causes memory issues in CI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func Fmt() error { | |
if !isGoLatest() { | |
return nil | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test386: | |
rebuild: always | |
cmd: export GOARCH=386 && go test ./... -timeout=1m && go env GOARCH |