-
Notifications
You must be signed in to change notification settings - Fork 543
Replace Travis CI with GitHub Actions #975
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c788c2e
First attempt at breaking out Travis CI into GitHub Actions
dgunay af8ddda
Rename actions to run all tests
dgunay a8b6d61
Rename missed name from GH actions template
dgunay 91b831f
delete travis.yml
dgunay 1e1bfb0
delete leftover commented out code from template
dgunay d56eab6
Run tests on pushes to master and pull requests
dgunay 531120d
first attempt at recreating build matrix
dgunay 7f695cd
Merge branch 'master' of github.com:dgunay/rust
dgunay d31adde
fix missing " in workflow
dgunay cb70645
attempt to fix special-case nightly include
dgunay 742aa5f
another attempt at making the file lint
dgunay ab113cf
Merge work to fix problems in GitHub Actions CI (#1)
dgunay e037ed8
Squashed commit - should be pretty close to working as intended:
dgunay 1e4d8c8
Merge branch 'master' of github.com:dgunay/rust
dgunay 79e1c8e
remove leftover always true TRAVIS_PULL_REQUEST
dgunay 230b1b1
shorten overall CI name for brevity
coriolinus 7ac069d
remove new comments in scripts
coriolinus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| name: CI | ||
|
|
||
| # Run this workflow every time a new commit is pushed to the repository | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| ensure-conventions: | ||
| name: Ensure conventions are followed | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| # Checks out a copy of your repository on the ubuntu-latest machine | ||
| - name: Checkout code | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Ensure src/lib.rs files exist | ||
| run: bash ./_test/ensure-lib-src-rs-exist.sh | ||
|
|
||
| - name: Count ignores | ||
| run: sh ./_test/count-ignores.sh | ||
|
|
||
| - name: Check UUIDs | ||
| run: sh ./_test/check-uuids.sh | ||
|
|
||
| - name: Verify exercise difficulties | ||
| run: ./_test/verify-exercise-difficulties.sh | ||
|
|
||
| - name: Check exercises for authors | ||
| run: ./_test/check-exercises-for-authors.sh | ||
|
|
||
| configlet: | ||
| name: Setup configlet | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| # Checks out master locally so that it is available to the scripts. | ||
| - name: Checkout master | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| ref: master | ||
|
|
||
| # Checks out a copy of your repository on the ubuntu-latest machine | ||
| - name: Checkout code | ||
| uses: actions/checkout@v2 | ||
|
|
||
| # Sets TRAVIS_PULL_REQUEST to false if this is not a pull request. | ||
| - name: set TRAVIS_PULL_REQUEST | ||
| env: | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| run: echo "TRAVIS_PULL_REQUEST=${PR_NUMBER:-false}" >> $GITHUB_ENV | ||
|
|
||
| - name: Fetch configlet | ||
| run: ./bin/fetch-configlet | ||
|
|
||
| - name: Check configlet format | ||
| run: ./_test/check-configlet-fmt.sh | ||
|
|
||
| - name: Ensure readmes are updated | ||
| run: sh ./_test/ensure-readmes-are-updated.sh | ||
|
|
||
| - name: Lint configlet | ||
| run: ./bin/configlet lint . | ||
|
|
||
|
|
||
| compilation: | ||
| name: Check compilation | ||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| # Allows running the job multiple times with different configurations | ||
| matrix: | ||
| rust: ["stable", "beta"] | ||
| deny_warnings: ['', '1'] | ||
|
|
||
| steps: | ||
| # Checks out master locally so that it is available to the scripts. | ||
| - name: Checkout master | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| ref: master | ||
|
|
||
| # Checks out a copy of your repository on the ubuntu-latest machine | ||
| - name: Checkout code | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Setup toolchain | ||
| uses: actions-rs/toolchain@v1 | ||
| with: | ||
| toolchain: ${{ matrix.rust }} | ||
| default: true | ||
|
|
||
| # Sets TRAVIS_PULL_REQUEST to false if this is not a pull request. | ||
| - name: set TRAVIS_PULL_REQUEST | ||
| env: | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| run: echo "TRAVIS_PULL_REQUEST=${PR_NUMBER:-false}" >> $GITHUB_ENV | ||
|
|
||
| # run scripts as steps | ||
| # TODO: the TRAVIS_PULL_REQUEST variable is a holdover from before the | ||
| # migration to GitHub Actions. The scripts that use it do so in order to | ||
| # run only on changed files. | ||
| - name: Check exercises | ||
| env: | ||
| DENYWARNINGS: ${{ matrix.deny_warnings }} | ||
| run: ./_test/check-exercises.sh | ||
| continue-on-error: ${{ matrix.rust == 'beta' && matrix.deny_warnings == '1' }} | ||
|
|
||
| - name: Ensure stubs compile | ||
| env: | ||
| DENYWARNINGS: ${{ matrix.deny_warnings }} | ||
| run: sh ./_test/ensure-stubs-compile.sh | ||
| continue-on-error: ${{ matrix.rust == 'beta' && matrix.deny_warnings == '1' }} | ||
|
|
||
| - name: Check exercise crate | ||
| env: | ||
| DENYWARNINGS: ${{ matrix.deny_warnings }} | ||
| run: sh ./_test/check-exercise-crate.sh | ||
| continue-on-error: ${{ matrix.rust == 'beta' && matrix.deny_warnings == '1' }} | ||
|
|
||
| nightly-compilation: | ||
| name: Check exercises on nightly (benchmark enabled) | ||
| runs-on: ubuntu-latest | ||
| continue-on-error: true # It's okay if the nightly job fails | ||
|
|
||
| steps: | ||
| # Checks out master locally so that it is available to the scripts. | ||
| - name: Checkout master | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| ref: master | ||
|
|
||
| # Checks out a copy of your repository on the ubuntu-latest machine | ||
| - name: Checkout code | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Setup nightly toolchain | ||
| uses: actions-rs/toolchain@v1 | ||
| with: | ||
| toolchain: nightly | ||
| default: true | ||
|
|
||
| - name: Check exercises | ||
| env: | ||
| BENCHMARK: '1' | ||
| run: ./_test/check-exercises.sh | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.