cs-codex-dist-tests/docker
Slava 9fe9f2ed36
Run tests in Kubernetes using GitHub Actions (#23)
* Add GitHub Actions workflow to run tests

* Text formatted
2023-06-04 20:28:17 +03:00
..
Dockerfile Add Docker builds 2023-05-28 23:10:17 +03:00
README.md Fix Docker repository link (#6) 2023-05-29 11:46:26 +03:00
docker-entrypoint.sh Add Docker builds 2023-05-28 23:10:17 +03:00
job.yaml Run tests in Kubernetes using GitHub Actions (#23) 2023-06-04 20:28:17 +03:00

README.md

Run tests with Docker in Kubernetes

We may run tests localy using installed Dotnet and inside Kubernetes we may use a prepared Docker images.

Custom entrypoint will do the following

  1. Clone repository
  2. Switch to the specific branch - master by default
  3. Run all tests - dotnet test

Run with defaults

docker run \
  --rm \
  --name cs-codex-dist-tests \
  codexstorage/cs-codex-dist-tests:sha-686757e

Just short tests

docker run \
  --rm \
  --name cs-codex-dist-tests \
  codexstorage/cs-codex-dist-tests:sha-686757e \
  dotnet test Tests

Custom branch

docker run \
  --rm \
  --name cs-codex-dist-tests \
  --env BRANCH=feature/tests \
  codexstorage/cs-codex-dist-tests:sha-686757e

Custom local config

docker run \
  --rm \
  --name cs-codex-dist-tests \
  --env CONFIG=/opt/Configuration.cs \
  --env CONFIG_SHOW=true \
  --volume $PWD/DistTestCore/Configuration.cs:/opt/Configuration.cs \
  codexstorage/cs-codex-dist-tests:sha-686757e

Local kubeconfig with custom local config

docker run \
  --rm \
  --name cs-codex-dist-tests \
  --env CONFIG=/opt/Configuration.cs \
  --env CONFIG_SHOW=true \
  --env SOURCE=https://github.com/codex-storage/cs-codex-dist-tests.git \
  --volume $PWD/DistTestCore/Configuration.cs:/opt/Configuration.cs \
  --volume $PWD/kubeconfig.yml:/opt/kubeconfig.yml \
  codexstorage/cs-codex-dist-tests:sha-686757e