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 GitHub action for CI tests #31

Conversation

ssiccha
Copy link
Contributor

@ssiccha ssiccha commented Nov 19, 2020

This PR configures GitHub Actions to run the package tests. It was created by a script. You can view the results of the added GitHub action at:
https://github.com/ssiccha/cvec/actions
This PR contains four commits which do:

  • adds a file .github/workflows/CI.yml which configures GitHub Actions to run the package tests,
  • removes the .travis.yml file if it exists in the package,
  • adds a CI action badge to the README.md, if it found none, and
  • removes the travis CI badge from the README.md, if it finds one.

Since this PR is generated automatically, before merging it:

  • Go to https://github.com/ssiccha/cvec/actions and confirm that the tests passed. You may have to specify values for the variables GAP_PKGS_TO_BUILD and GAP_PKGS_TO_CLONE in the .github/workflows/CI.yml file as described further below.
  • Double-check that the last three commits do not break anything.
  • Eventually add tests that were in the .travis.yml but are missing in the .github/workflows/CI.yml.

The added GitHub action CI contains a job test, which runs your package's tests using the same scripts as previously did Travis, namely those from
https://github.com/gap-system/pkg-ci-scripts
By default it tests your package with the following gap branches:

  • master
  • stable-4.11
  • stable-4.10

The action CI also contains a job manual, which compiles your package's documentation with latex and uploads the resulting pdf as an artifact, which means that it can be downloaded once all jobs of the action completed.

If you need to compile packages to load your package, set the input GAP_PKGS_TO_BUILD for the action gap-actions/setup-gap-for-packages@v1 to a space-separated list of packages as follows:

- uses: gap-actions/setup-gap-for-packages@v1
  with:
    GAPBRANCH: ${{ matrix.gap-branch }}
    GAP_PKGS_TO_BUILD: "<list-of-packages>"

If you need to clone the development version of packages set the input GAP_PKGS_TO_CLONE for the action gap-actions/setup-gap-for-packages@v1 to a space-separated list of packages as follows:

- uses: gap-actions/setup-gap-for-packages@v1
  with:
    GAPBRANCH: ${{ matrix.gap-branch }}
    GAP_PKGS_TO_CLONE: "<list-of-packages>"

Notice that you may also have to set inputs for the action gap-actions/setup-gap-for-packages@v1 in the job manual.

If you want to adjust which tests are run have a look at the documentation of the job matrix, especially also at how to use the include: keywordYou can add changes to this PR by adding my fork as a remote, checking it out and then committing and pushing as follows:

git remote add ssiccha https://github.com/ssiccha/cvec
git checkout ss/add-GitHub-actions-for-package-tests
# Add and commit your changes
...
git push

The custom gap actions which are used by the added action can be found at:
https://github.com/gap-actions

language: c
env:
global:
- GAP_PKGS_TO_BUILD="io profiling orb"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR does not seem to have transferred the above (orb is missing)

- env: GAPBRANCH=master
- env: GAPBRANCH=stable-4.11
- env: GAPBRANCH=stable-4.10
- env: GAPBRANCH=master ABI=32
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this 32bit test is missing, too

README.md Outdated
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.com/gap-packages/cvec.svg?branch=master)](https://travis-ci.com/gap-packages/cvec)
![CI](https://github.com/gap-packages/cvec/workflows/CI/badge.svg)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing a link to the CI results (as it is present in e.g. the GAP README.md)

@ssiccha ssiccha force-pushed the ss/add-GitHub-actions-for-package-tests branch 2 times, most recently from 0767f4f to d9d279e Compare February 17, 2021 22:08
@ssiccha
Copy link
Contributor Author

ssiccha commented Feb 21, 2021

@fingolfin This should work now. Could you have a look again? Ah no, I mixed something up. This one is still failing.

@ssiccha ssiccha force-pushed the ss/add-GitHub-actions-for-package-tests branch from d9d279e to 73a1bad Compare February 21, 2021 15:10
@ssiccha
Copy link
Contributor Author

ssiccha commented Feb 21, 2021

@fingolfin Now tests passed.

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.

2 participants