S-mishina / flexiblemockserver

This is a mock server used to verify the operation of service mesh tools. Service mesh tools refer to Istio, Linkerd, and Kuma.
0 stars 0 forks source link

Add deploy workflow #13

Closed S-mishina closed 3 months ago

S-mishina commented 3 months ago

This excerpt from deploy.yaml outlines two jobs in our GitHub Actions workflow: a testing job and a deployment job.

The testing job begins by setting up Python using actions/setup-python@v5.1.0, specifying Python version 3.10.0 and an x64 architecture. It then sets up caching for pip dependencies using actions/cache@v4.0.2, which will significantly speed up future workflow runs by reusing previously installed packages. The cache key is dependent on the runner OS and the hash of requirements.txt, ensuring the cache is updated whenever our dependencies change. After setting up the cache, the workflow installs the pip requirements from requirements.txt and runs Python unit tests.

The deployment job, which depends on the successful completion of the testing job (needs: test_ci), is set to run only when a pull request is merged (if: github.event.pull_request.merged == true). This job also begins by setting up Python and checking out the code. The remaining steps for this job (not shown in the excerpt) would typically involve building and pushing a Docker image, or deploying the application to a server.