attempt to run k8s in gha #12
Workflow file for this run
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
name: run k8s in a github action? | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
execute: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Task | |
uses: arduino/setup-task@v2 | |
- run: task setup-local-env | |
- name: setup k8s | |
uses: helm/[email protected] | |
- name: Verify k8s | |
run: | | |
kubectl cluster-info | |
kubectl get nodes | |
- name: deploy | |
run: | | |
docker image pull ghcr.io/sillsdev/lexbox-hgweb:latest | |
docker image pull ghcr.io/sillsdev/lexbox-api:develop | |
docker image pull ghcr.io/sillsdev/lexbox-ui:develop | |
kind load docker-image ghcr.io/sillsdev/lexbox-hgweb:latest | |
kind load docker-image ghcr.io/sillsdev/lexbox-api:develop | |
kind load docker-image ghcr.io/sillsdev/lexbox-ui:develop | |
kubectl create namespace languagedepot | |
kubectl apply -k ./deployment/gha | |
kubectl wait --for=condition=Ready --timeout=60s pod -l 'app in (lexbox, ui, hg, db)' -n languagedepot | |
- name: status | |
if: failure() | |
run: | | |
kubectl describe pods -l 'app in (lexbox, ui, hg, db)' -n languagedepot | |
echo "========== LOGS ==========" | |
kubectl logs -l 'app in (lexbox, ui, hg, db)' -n languagedepot --prefix --all-containers | |
- name: test | |
env: | |
TEST_SERVER_HOSTNAME: 'localhost' | |
TEST_STANDARD_HG_HOSTNAME: 'hg.localhost' | |
TEST_RESUMABLE_HG_HOSTNAME: 'resumable.localhost' | |
TEST_PROJECT_CODE: 'sena-3' | |
TEST_DEFAULT_PASSWORD: 'pass' | |
run: dotnet test --logger GitHubActions --filter Category=Integration | |