-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Jenkins with GitHub actions [integ_0.10] (#653)
* Replace Jenkins with GitHub actions [integ_0.10] * Fix branches pattern --------- Co-authored-by: Gal Topper <[email protected]>
- Loading branch information
Showing
3 changed files
with
176 additions
and
214 deletions.
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Copyright 2023 Iguazio | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
name: CI | ||
|
||
on: | ||
pull_request_target: | ||
branches: | ||
- development | ||
- 'integ_[0-9]+\.[0-9]+' | ||
|
||
jobs: | ||
test: | ||
name: Lint & test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Dump github context | ||
run: echo "$GITHUB_CONTEXT" | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
|
||
- name: Dump runner context | ||
run: echo "$RUNNER_CONTEXT" | ||
env: | ||
RUNNER_CONTEXT: ${{ toJson(runner) }} | ||
|
||
- name: Dump github ref | ||
run: echo "$GITHUB_REF" | ||
|
||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.19.5 | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
ref: refs/pull/${{ github.event.number }}/merge | ||
|
||
- name: Lint | ||
run: make lint | ||
|
||
- name: Run Go tests | ||
run: make test-go | ||
env: | ||
V3IO_API: ${{ secrets.V3IO_API }} | ||
V3IO_ACCESS_KEY: ${{ secrets.V3IO_ACCESS_KEY }} | ||
V3IO_SESSION: container=bigdata,user=admin |
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 |
---|---|---|
@@ -0,0 +1,118 @@ | ||
# Copyright 2023 Iguazio | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
test: | ||
name: Lint & test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Dump github context | ||
run: echo "$GITHUB_CONTEXT" | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
|
||
- name: Dump runner context | ||
run: echo "$RUNNER_CONTEXT" | ||
env: | ||
RUNNER_CONTEXT: ${{ toJson(runner) }} | ||
|
||
- name: Dump github ref | ||
run: echo "$GITHUB_REF" | ||
|
||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "^1.19.5" | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Lint | ||
run: make lint | ||
|
||
- name: Run Go tests | ||
run: make test-go | ||
env: | ||
V3IO_API: ${{ secrets.V3IO_API }} | ||
V3IO_ACCESS_KEY: ${{ secrets.V3IO_ACCESS_KEY }} | ||
V3IO_SESSION: container=bigdata,user=admin | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' | ||
needs: | ||
- test | ||
strategy: | ||
matrix: | ||
go-os: | ||
- linux | ||
- darwin | ||
- windows | ||
|
||
steps: | ||
- name: Dump GitHub context | ||
run: echo "$GITHUB_CONTEXT" | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
|
||
- name: Dump runner context | ||
run: echo "$RUNNER_CONTEXT" | ||
env: | ||
RUNNER_CONTEXT: ${{ toJson(runner) }} | ||
|
||
- name: Dump github ref | ||
run: echo "$GITHUB_REF" | ||
|
||
- name: Extract ref info | ||
id: release_info | ||
run: | | ||
echo ::set-output name=REF_BRANCH::${GITHUB_REF#refs/heads/} | ||
echo ::set-output name=REF_TAG::${GITHUB_REF#refs/tags/} | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "^1.19.5" | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Build binaries for ${{ matrix.go-os }} | ||
run: make frames-bin | ||
env: | ||
GOPATH: ${{ github.workspace }}/go | ||
GOARCH: amd64 | ||
GOOS: ${{ matrix.go-os }} | ||
|
||
- name: Upload binaries | ||
uses: AButler/[email protected] | ||
with: | ||
files: ${{ github.workspace }}/go/bin/framesd-* | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.