-
Notifications
You must be signed in to change notification settings - Fork 231
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
CI on PR #345
Closed
Closed
CI on PR #345
Changes from 2 commits
Commits
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 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 |
---|---|---|
@@ -1,42 +1,75 @@ | ||
on: push | ||
name: make all | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
makeall: | ||
name: make all | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Determine ref | ||
id: ref | ||
run: | | ||
ref="" | ||
|
||
if [ "${{ github.event_name }}" == "push" ]; then | ||
full_ref="${{ github.ref }}" | ||
ref_without_ref="${full_ref##refs/}" | ||
ref_without_heads="${ref_without_ref##heads/}" | ||
ref="${ref_without_heads##tags/}" | ||
elif [ "${{ github.event_name }}" == "pull_request" ]; then | ||
ref="${{ github.head_ref }}" | ||
else | ||
echo "Something went VERY wrong!" | ||
exit 5 | ||
fi | ||
|
||
echo "Ref: ${ref}" | ||
echo "::set-output name=ref::${ref}" | ||
|
||
- name: Clone code | ||
run: git clone --depth=1 --branch="${{ steps.ref.outputs.ref }}" -c core.autocrlf=false https://github.com/${{ github.repository }} . | ||
|
||
- name: install deps | ||
shell: bash | ||
run: | | ||
sudo apt install -y \ | ||
libseccomp-dev \ | ||
parallel \ | ||
uidmap \ | ||
pigz \ | ||
--no-install-recommends | ||
shell: bash | ||
|
||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.13.1' # The Go version to download (if necessary) and use. | ||
go-version: "^1.13.1" # The Go version to download (if necessary) and use. | ||
|
||
- name: install go tools | ||
shell: bash | ||
run: | | ||
go get golang.org/x/lint/golint | ||
go get honnef.co/go/tools/cmd/staticcheck | ||
go get -u github.com/go-bindata/go-bindata/go-bindata | ||
sudo mkdir -p /run/runc | ||
sudo chown runner:runner -R /run/runc | ||
shell: bash | ||
|
||
- name: make all | ||
run: make all | ||
shell: bash | ||
run: make all | ||
|
||
- name: Run Test Coverage | ||
shell: bash | ||
run: | | ||
make cover | ||
bash <(curl -s https://codecov.io/bash) | ||
shell: bash | ||
|
||
- name: Run e2e Tests | ||
env: | ||
STATE_DIR: $HOME/img | ||
run: | | ||
make install | ||
./contrib/e2e-dockerfiles-build-test.sh | ||
env: | ||
STATE_DIR: $HOME/img |
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.
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 line LGTM, but I don’t think we need other changes
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.
I guess the checkout action does actually do a lot more in less lines in this case. I'm used to just issuing
clone
commands directly; forgot that action would handle figuring out refs for different events.Let me tackle the revert of these other lines tomorrow morning.