Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaelabalutoiu committed Jul 28, 2023
1 parent 71b334e commit d01a5aa
Show file tree
Hide file tree
Showing 2 changed files with 1,365 additions and 53 deletions.
79 changes: 26 additions & 53 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ name: Integration Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
- test-e2e-wip

jobs:
garm-cli-test:
integration-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -30,9 +27,6 @@ jobs:
- name: Setup GARM server
shell: bash
run: |
set -e
set -o pipefail
sudo useradd --shell /usr/bin/false --system --groups lxd --no-create-home garm
sudo mkdir -p /etc/garm /var/log/garm
Expand Down Expand Up @@ -93,6 +87,16 @@ jobs:
public = true
protocol = "simplestreams"
skip_verify = false
[[github]]
name = "mihaelabalutoiu"
description = "github token of user mihaelabalutoiu"
oauth2_token = "${{ secrets.AUTH2_TOKEN_SECRETS }}"
[[github]]
name = "mihaelabalutoiu"
description = "github token of user mihaelabalutoiu-clone"
oauth2_token = "${{ secrets.AUTH2_TOKEN_SECRETS }}"
EOF
sudo mv config.toml /etc/garm/config.toml
sudo chown -R garm:garm /etc/garm /var/log/garm
Expand Down Expand Up @@ -120,53 +124,22 @@ jobs:
wait_open_port 127.0.0.1 9997
- name: Test GARM API with garm-cli tool
- name: Run integration tests
shell: bash
run: |
set -e
set -x
set -o pipefail
GARM_URL="http://127.0.0.1:9997"
ADMIN_USERNAME='admin'
ADMIN_PASWORD='Ma*jirksiCr9esrT8DGQPrfx*XKnBVZo'
garm-cli init --debug \
--name="local_garm" \
--url $GARM_URL \
--email root@localhost \
--username $ADMIN_USERNAME \
--password $ADMIN_PASWORD
garm-cli profile add --debug \
--name="local_garm_2" \
--url $GARM_URL \
--username $ADMIN_USERNAME \
--password $ADMIN_PASWORD
garm-cli profile login --debug \
--username $ADMIN_USERNAME \
--password $ADMIN_PASWORD
garm-cli metrics-token --debug create
garm-cli provider --debug list
garm-cli profile --debug list
garm-cli runner --debug list --all
garm-cli credentials --debug list
garm-cli job --debug list
garm-cli org --debug list
garm-cli repo --debug list
garm-cli enterprise --debug list
garm-cli pool --debug list --all
export GARM_BASE_URL="http://127.0.0.1:9997"
export GARM_USERNAME='admin'
export GARM_PASSWORD='~Cxe3+Qf;KO~2!I<Jp;5n*UJk_r4O*&jAfw(W0YHZSL8g`@uGc)vr8l24)zA;_n6'
export GARM_FULLNAME='test-fullname'
export GARM_EMAIL='test@example.com'
export GARM_NAME='local_garm'
export CREDENTIALS_NAME='mihaelabalutoiu'
export REPO_WEBHOOK_SECRET=${{ secrets.REPO_WEBHOOK_SECRET }}
export ORG_WEBHOOK_SECRET=${{ secrets.ORG_WEBHOOK_SECRET }}
go run integration/e2e.go
sudo cat /var/log/garm/runner-manager.log
- name: Show GARM logs
run: |
Expand Down
Loading

0 comments on commit d01a5aa

Please sign in to comment.