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

Add targets to test command #4267

Merged
merged 4 commits into from Apr 29, 2024
Merged

Add targets to test command #4267

merged 4 commits into from Apr 29, 2024

Conversation

maroshii
Copy link
Contributor

Allow to select tests when running okteto test:

okteto test unit integration ...

This is a bit trickier than in sounds given that we need to follow the depends_on field. In this case, for example, when I run okteto test unit the setup target should also get executed as a prerequisite of unit:

test:
  setup:
    image: okteto/golang:1
    commands:
      - "echo this is my test setup"
  unit:
    depends_on:
      - setup
    image: okteto/golang:1
    commands:
      - "go test . -v"
  integration:
    depends_on:
      - setup
    context: integration
    commands:
      - "./run-tests.sh"

@maroshii maroshii requested a review from a team as a code owner April 26, 2024 16:10
Copy link

codecov bot commented Apr 26, 2024

Codecov Report

Attention: Patch coverage is 58.33333% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 45.67%. Comparing base (89a3aa2) to head (b1e5ce5).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4267      +/-   ##
==========================================
+ Coverage   45.64%   45.67%   +0.02%     
==========================================
  Files         308      308              
  Lines       27790    27814      +24     
==========================================
+ Hits        12685    12704      +19     
  Misses      14017    14017              
- Partials     1088     1093       +5     

@maroshii maroshii merged commit 9b4a1df into master Apr 29, 2024
10 of 12 checks passed
@maroshii maroshii deleted the fran/test-targets branch April 29, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants