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 --test-package-append that you can specify extra test packages for each test. #910

Merged
merged 6 commits into from
Jan 2, 2024

Conversation

vaikas
Copy link
Member

@vaikas vaikas commented Jan 2, 2024

Add a new flag --test-package-append that allows you to omit specifying packages in the yaml file, and instead specify
them from the command line. They are handy if you have a common package that all tests require so that you don't have
to keep specifying them in your yaml.

Melange Pull Request Template

Functional Changes

  • This change can build all of Wolfi without errors (describe results in notes)

Notes:

SCA Changes

  • Examining several representative APKs show no regression / the desired effect (details in notes)

Notes:

Linter

  • The new check is clean across Wolfi
  • The new check is opt-in or a warning

Notes:

vaikas added 2 commits January 2, 2024 10:29
…r each test.

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
@vaikas
Copy link
Member Author

vaikas commented Jan 2, 2024

Hm, what the heck am I doing wrong here:
https://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution#overview

Their example is:

if: ${{ ! startsWith(github.ref, 'refs/tags/') }}

Yet the yaml file is deemed invalid here:
https://github.com/chainguard-dev/melange/actions/runs/7389375643

The workflow is not valid. .github/workflows/melange-test-pipelines.yaml (Line: 80, Col: 13): Unexpected symbol: '${{'. Located at position 13 within expression: ! endsWith( ${{ matrix.package

I'm clearly missing something:
https://github.com/chainguard-dev/melange/pull/910/files#diff-1b8e5d0e09c96ec54aca51c55dbbb57a171052b14f3a289ef3f93af244ed4e1aR80

        if: ${{ ! endsWith( ${{ matrix.package }}, '-nopkg' ) }}

Maybe I can't eval the ${{ matrix.package }} within endsWith?

@rawlingsj
Copy link
Member

does removing the dollar squgilies from around matrix help?
i.e.

if: ${{ ! endsWith(matrix.package, '-nopkg') }}

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
@vaikas
Copy link
Member Author

vaikas commented Jan 2, 2024

matrix.package

Thanks! Looks like if I just use false == ... it works. Well, fails for different reason, but progress 😆

vaikas added 2 commits January 2, 2024 11:03
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
@vaikas
Copy link
Member Author

vaikas commented Jan 2, 2024

matrix.package

Thanks! Looks like if I just use false == ... it works. Well, fails for different reason, but progress 😆

Thanks @rawlingsj removing the ${{ around matrix. seems to have done the trick!!! 🙇

Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
@vaikas vaikas merged commit a0e5889 into chainguard-dev:main Jan 2, 2024
30 of 31 checks passed
@vaikas vaikas deleted the clean-testing-part-1 branch January 2, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants