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 b361d56
Show file tree
Hide file tree
Showing 2 changed files with 1,361 additions and 43 deletions.
65 changes: 22 additions & 43 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ name: Integration Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
- test-e2e-wip

jobs:
garm-cli-test:
Expand Down Expand Up @@ -93,6 +90,15 @@ jobs:
public = true
protocol = "simplestreams"
skip_verify = false
[[github]]
name = "mihaelabalutoiu"
description = "github token of user ionutbalutoiu"
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 +126,26 @@ jobs:
wait_open_port 127.0.0.1 9997
- name: Test GARM API with garm-cli tool
- name: Test GARM API
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
export GARM_URL="http://127.0.0.1:9997"
export GARM_USERNAME='admin'
export GARM_PASWORD='Ma*jirksiCr9esrT8DGQPrfx*XKnBVZo'
export GARM_FULLNAME='test-fullname'
export GARM_EMAIL='test@example.com'
export GARM_NAME='local_garm'
export CREDENTIALS_NAME='mihaelabalutoiu'
garm-cli enterprise --debug list
export REPO_WEBHOOK_SECRET=${{ secrets.REPO_WEBHOOK_SECRET }}
export ORG_WEBHOOK_SECRET=${{ secrets.ORG_WEBHOOK_SECRET }}
garm-cli pool --debug list --all
go run integration/e2e.go
- name: Show GARM logs
run: |
Expand Down
Loading

0 comments on commit b361d56

Please sign in to comment.