-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
try adding very basic of ci/tests (#1)
* try adding very basic of ci/tests * hyperqueue not working yet - next item of action Signed-off-by: vsoch <vsoch@users.noreply.github.com>
- Loading branch information
Showing
16 changed files
with
293 additions
and
26 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,38 @@ | ||
name: build hyperqueue-operator | ||
|
||
on: | ||
pull_request: [] | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# catalog and bundle were removed, nobody using | ||
command: [docker] | ||
|
||
name: make and build ${{ matrix.command }} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.18.1 | ||
- name: GHCR Login | ||
if: (github.event_name != 'pull_request') | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build Container | ||
run: make ${{ matrix.command }}-build | ||
|
||
- name: Deploy Container | ||
if: (github.event_name != 'pull_request') | ||
run: make ${{ matrix.command }}-push |
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,90 @@ | ||
name: test hyperqueue-operator | ||
|
||
on: | ||
pull_request: [] | ||
|
||
jobs: | ||
formatting: | ||
name: Formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup black linter | ||
run: conda create --quiet --name black pyflakes | ||
|
||
- name: Check Spelling | ||
uses: crate-ci/typos@7ad296c72fa8265059cc03d1eda562fbdfcd6df2 # v1.9.0 | ||
with: | ||
files: ./README.md ./config/samples | ||
|
||
unit-tests: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.18 | ||
- name: fmt check | ||
run: make fmt | ||
|
||
# These aren't written yet | ||
- name: Run Unit tests | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: make test | ||
|
||
# Ensure build-config is the same as the one we have | ||
- name: Check Updated hyperqueue-operator.yaml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
cp examples/dist/hyperqueue-operator.yaml /tmp/hyperqueue-operator.yaml | ||
make build-config | ||
diff examples/dist/hyperqueue-operator.yaml /tmp/hyperqueue-operator.yaml | ||
test-jobs: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
test: [["hello-world", "ubuntu", 20]] | ||
|
||
steps: | ||
- name: Clone the code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.18 | ||
|
||
- name: Start minikube | ||
uses: medyagh/setup-minikube@697f2b7aaed5f70bf2a94ee21a4ec3dde7b12f92 # v0.0.9 | ||
|
||
- name: Create the namespace | ||
run: kubectl create namespace hyperqueue-operator | ||
|
||
- name: Pull Docker Containers to MiniKube | ||
env: | ||
container: ${{ matrix.test[1] }} | ||
test: ${{ matrix[0] }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
export SHELL=/bin/bash | ||
eval $(minikube -p minikube docker-env) | ||
minikube ssh docker pull ${container} | ||
make deploy-local | ||
minikube image load ghcr.io/converged-computing/hyperqueue-operator:test | ||
kubectl apply -f examples/dist/hyperqueue-operator-local.yaml | ||
- name: Test ${{ matrix.test[0] }} | ||
env: | ||
name: ${{ matrix.test[0] }} | ||
jobtime: ${{ matrix.test[2] }} | ||
run: | | ||
echo "TODO test ${name}" | ||
# /bin/bash ./script/test.sh ${name} ${jobtime} |
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
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
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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
|
||
# Shared logic to install hq | ||
{{template "init" .}} | ||
hq worker start | ||
hq worker start | ||
{{template "exit" .}} |
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
Oops, something went wrong.