Skip to content

Commit

Permalink
💚 lets see the output in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed May 6, 2024
1 parent fa98905 commit 5a28ffe
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 21 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Run Examples

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
run-examples:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21

- name: Run Simple
run: go run examples/simple/main.go
- name: Run Progress
run: go run examples/progress/main.go
- name: Run Multi
run: go run examples/multi/main.go
44 changes: 23 additions & 21 deletions examples/multi/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,33 @@ func main() {
},
},

{
Title: "Pluck the polish and marans",
Tasks: taskin.Tasks{
{
Title: "Pluck the polish",
Task: func(t *taskin.Task) error {
for i := 0; i < 3; i++ {
t.Title = fmt.Sprintf(" [%d/3] polish plucked", i+1)
time.Sleep(500 * time.Millisecond)
}
return nil
/*
{
Title: "Pluck the polish and marans",
Tasks: taskin.Tasks{
{
Title: "Pluck the polish",
Task: func(t *taskin.Task) error {
for i := 0; i < 3; i++ {
t.Title = fmt.Sprintf(" [%d/3] polish plucked", i+1)
time.Sleep(500 * time.Millisecond)
}
return nil
},
},
},
{
Title: "Pluck the marans",
Task: func(t *taskin.Task) error {
for i := 0; i < 3; i++ {
t.Title = fmt.Sprintf(" [%d/3] marans plucked", i+1)
time.Sleep(500 * time.Millisecond)
}
return nil
{
Title: "Pluck the marans",
Task: func(t *taskin.Task) error {
for i := 0; i < 3; i++ {
t.Title = fmt.Sprintf(" [%d/3] marans plucked", i+1)
time.Sleep(500 * time.Millisecond)
}
return nil
},
},
},
},
},
*/

{
Title: "Pluck the leghorns",
Expand Down

0 comments on commit 5a28ffe

Please sign in to comment.