close
The Wayback Machine - https://web.archive.org/web/20201101072256/https://github.com/nektos/act/pull/382
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

Simpler list view #382

Merged
merged 4 commits into from Oct 12, 2020
Merged

Simpler list view #382

merged 4 commits into from Oct 12, 2020

Conversation

@lshamis
Copy link
Contributor

@lshamis lshamis commented Oct 6, 2020

Issue #260

Simplifies the output of -l into a more standard table view.
Also allows for ID discovery, to go with the -j flag.

For this repo:

Before:

# act -l
    ╭──────╮ ╭──────╮
    │ lint │ │ test │
    ╰──────╯ ╰──────╯
            ⬇
 ╭─────────╮ ╭──────────╮
 │ release │ │ snapshot │
 ╰─────────╯ ╰──────────╯

After:

# act -l
ID        Stage  Name      
lint      0      Lint      
test      0      Test      
snapshot  1      Snapshot  
release   1      Release   

For alephzero repo:

Before:

# act -l
 ╭──────────────────────────────╮ ╭───────────────────────────╮ ╭───────────────────╮ ╭──────────────────────╮ ╭──────────────────────────╮ ╭────────────╮ ╭──────────────╮ ╭──────────╮ ╭────────────────────────────╮ ╭───────────────╮ ╭─────────────╮ ╭────────────╮ ╭─────────────────────────────╮ ╭──────────────────╮ ╭────────╮
 │ Undefined Behavior Sanitizer │ │ Ubuntu Bionic Default GCC │ │ Address Sanitizer │ │ Include What You Use │ │ Ubuntu Focal Default GCC │ │ Clang-Tidy │ │ Alpine Clang │ │ Valgrind │ │ Ubuntu Focal Default Clang │ │ Code Coverage │ │ Alpine Musl │ │ Alpine GCC │ │ Ubuntu Bionic Default Clang │ │ Thread Sanitizer │ │ Format │
 ╰──────────────────────────────╯ ╰───────────────────────────╯ ╰───────────────────╯ ╰──────────────────────╯ ╰──────────────────────────╯ ╰────────────╯ ╰──────────────╯ ╰──────────╯ ╰────────────────────────────╯ ╰───────────────╯ ╰─────────────╯ ╰────────────╯ ╰─────────────────────────────╯ ╰──────────────────╯ ╰────────╯

After:

# act -l
ID            Stage  Name                          
ubsan         0      Undefined Behavior Sanitizer  
iwyu          0      Include What You Use          
tsan          0      Thread Sanitizer              
clang_tidy    0      Clang-Tidy                    
bionic_gcc    0      Ubuntu Bionic Default GCC     
alpine_musl   0      Alpine Musl                   
asan          0      Address Sanitizer             
focal_gcc     0      Ubuntu Focal Default GCC      
format        0      Format                        
cov           0      Code Coverage                 
alpine_gcc    0      Alpine GCC                    
valgrind      0      Valgrind                      
bionic_clang  0      Ubuntu Bionic Default Clang   
focal_clang   0      Ubuntu Focal Default Clang    
alpine_clang  0      Alpine Clang                  
Leonid Shamis added 2 commits Oct 5, 2020
Leonid Shamis
@lshamis lshamis requested a review from cplee as a code owner Oct 6, 2020
@lshamis
Copy link
Contributor Author

@lshamis lshamis commented Oct 6, 2020

@cplee I'm not sure which test I'm breaking

@lshamis
Copy link
Contributor Author

@lshamis lshamis commented Oct 11, 2020

#383 had the same test breakage, which seems unrelated to the change.

@cplee
Copy link
Contributor

@cplee cplee commented Oct 12, 2020

@lshamis - i fixed the tests by rebasing. I'm a little sad to see the old view go away ...what do you think about keeping it with a -g/--graph option?

Leonid Shamis
@lshamis
Copy link
Contributor Author

@lshamis lshamis commented Oct 12, 2020

/act# go run . -h
Run Github actions locally by specifying the event name (e.g. `push`) or an action name directly.

Usage:
  act [event name to run] [flags]

Flags:
  -a, --actor string           user that triggered the event (default "nektos/act")
  -b, --bind                   bind working directory to container, rather than copy
      --defaultbranch string   the name of the main branch
  -C, --directory string       working directory (default ".")
  -n, --dryrun                 dryrun mode
      --env-file string        environment file to read and use as env in the containers (default ".env")
  -e, --eventpath string       path to event JSON file
  -g, --graph                  draw workflows
  -h, --help                   help for act
  -j, --job string             run job
  -l, --list                   list workflows
  -P, --platform stringArray   custom image to use per platform (e.g. -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04)
      --privileged             use privileged mode
  -p, --pull                   pull docker image(s) if already present
  -q, --quiet                  disable logging of output from steps
  -r, --reuse                  reuse action containers to maintain state
  -s, --secret stringArray     secret to make available to actions with optional value (e.g. -s mysecret=foo or -s mysecret)
      --secret-file string     file with list of secrets to read from (e.g. --secret-file .secrets)
  -v, --verbose                verbose output
  -w, --watch                  watch the contents of the local repo and run when files change
  -W, --workflows string       path to workflow file(s) (default "./.github/workflows/")


/act# go run . -l
ID        Stage  Name      
lint      0      Lint      
test      0      Test      
release   1      Release   
snapshot  1      Snapshot  


/act# go run . -g
    ╭──────╮ ╭──────╮
    │ Test │ │ Lint │
    ╰──────╯ ╰──────╯
            ⬇
 ╭──────────╮ ╭─────────╮
 │ Snapshot │ │ Release │
 ╰──────────╯ ╰─────────╯

@lshamis
Copy link
Contributor Author

@lshamis lshamis commented Oct 12, 2020

Yup, re-added the graph view.

Would you mind adding the label hacktoberfest-accepted?

@cplee
cplee approved these changes Oct 12, 2020
@cplee cplee merged commit 644bc2b into nektos:master Oct 12, 2020
4 checks passed
4 checks passed
Lint
Details
Test
Details
Snapshot
Details
Release
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.