-
Notifications
You must be signed in to change notification settings - Fork 10
Attempt to migrate from Travis to GitHub Actions #302
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
Changes from all commits
ed19681
449d6f4
24297ef
fbadb46
01cd3bc
02df1c5
376f5a1
2b88f66
63e418e
d207551
a6ff530
fb397ec
880d974
d5e3482
4e2846f
09ab428
b729db3
56e710b
493a9ae
d63eadc
0c7c2d7
d240a69
0c2e66e
43aead4
1e9f947
1b5a699
a2024d9
8fa4548
0f3459d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# GitHub Action to compile and test | ||
name: test | ||
on: [push, pull_request] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
task: [data-check, codespell] | ||
#spellintian, nosetests, karma, lint, closure-compiler, | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Install dependencies | ||
env: | ||
TASK: ${{ matrix.task }} | ||
run: | | ||
if [ "$TASK" = "nosetests" -o "$TASK" = "flake8" -o "$TASK" = "flake8-wip" ]; then pip install json-spec; fi | ||
if [ "$TASK" = "karma" -o "$TASK" = "lint" -o "$TASK" = "closure-compiler" ]; then npm install -g grunt-cli; fi | ||
if [ "$TASK" = "karma" -o "$TASK" = "lint" -o "$TASK" = "closure-compiler" ]; then npm install; fi | ||
if [ "$TASK" = "flake8" -o "$TASK" = "flake8-wip" ]; then pip install flake8; fi | ||
# If this causes SSL errors, then Sourceforge is probably in disaster recovery mode and needing Javascript. Could switch to a specific mirror, e.g. kent.dl.sourceforge.net | ||
if [ "$TASK" = "pychecker" -o "$TASK" = "pychecker-wip" ]; then pip install http://sourceforge.net/projects/pychecker/files/pychecker/0.8.19/pychecker-0.8.19.tar.gz/download; fi | ||
#if [ "$TASK" = "codespell" ]; then pip install git+https://github.com/codespell-project/codespell.git; fi | ||
if [ "$TASK" = "codespell" ]; then pip install codespell; fi | ||
sudo apt-get install xvfb | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not have those four There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah that's a fair point. I think I was running them individually as the presence of a package already being installed broke the whole build! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See also #304 |
||
sudo apt-get install libhtml-parser-perl | ||
sudo apt-get install lintian | ||
sudo apt-get install moreutils | ||
- uses: codespell-project/codespell-problem-matcher@v1 | ||
- name: Test | ||
env: | ||
TASK: ${{ matrix.task }} | ||
run: | | ||
bash -ex .travis-ci.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting use of matrix builds. I would've expected several steps/jobs instead of tasks defined by a matrix but why not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was simply to get it the closest to our existing Travis setup, given it currently just calls the old script for that.
I think if you had steps/jobs, then where you've got say json-spec needed on more than one, you'd have to duplicate the install instructions (or install it even for the builds which don't need it, which doesn't seem very efficient to me.