forked from cheqd/did-resolver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(docker): Switch to non-root runner [DEV-1737] (cheqd#50)
* build(docker): Switch to non-root runner * Update docker-compose.yml * Squashed commit of the following: commit e28d62e Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Oct 12 23:25:48 2022 +0100 chore(deps): Bump google.golang.org/grpc from 1.49.0 to 1.50.0 (cheqd#52) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.49.0 to 1.50.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.49.0...v1.50.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit d2bc574 Author: Ankur Banerjee <[email protected]> Date: Tue Oct 4 15:02:56 2022 +0100 ci: Add production tag for Docker image commit c4c6f77 Author: filipdjokic <[email protected]> Date: Tue Oct 4 12:15:15 2022 +0200 ci: Automate DID-resolver deployments [DEV-1263] (cheqd#51) * Push images to DOCR and automate deployments for both environments * Fix super linter issues * Fix typos * Updated production deploy text * Update triggers * ci: change staging deployment logic [DEV-1263] * ci: fix buildx issues * ci: fix tag issues * Drop tags named after branches * Change build-push action * Update image name in tests folder * Rename to deploy * Update dispatch guard * Remove release guard * Add docker metadata to avoid tag errors * Fix superlinter errors * Switch to relative paths to fix permissions errors * Set build tags * Add deploy staging * Check push to both GCHR and DOCR * Remove GHCR from build stage * Remove GHCR from deploy * Update URL with protocol scheme * Update README.md Co-authored-by: Ankur Banerjee <[email protected]> * Change ref protection for release * Turn off verbose link checking * Split test workflow out * Update dispatch for new image * Fix workflow titles * Save build and staging images separately * Change Docker image in test workflow
- Loading branch information
Showing
8 changed files
with
634 additions
and
417 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: "Build & Test" | ||
on: | ||
workflow_call: | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
|
||
unit-tests: | ||
name: "Unit Tests" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version-file: ./go.mod | ||
|
||
- name: Run Golang unit tests | ||
run: go test -v ./... | ||
|
||
integration-tests: | ||
name: "Integration Tests" | ||
runs-on: ubuntu-latest | ||
env: | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download Docker image | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: did-resolver-build | ||
|
||
- name: Load Docker image | ||
run: docker image load --input did-resolver-build.tar | ||
|
||
- name: Set up Docker container for test | ||
run: docker-compose -f tests/docker/docker-compose.yml --env-file tests/docker/docker-compose.env up -d --no-build | ||
|
||
- name: Setup Python environment | ||
working-directory: ./tests/pytest | ||
run: | | ||
set -euo pipefail | ||
pip3 install -r requirements.txt >> /dev/null | ||
sudo chmod -R 775 /home/runner/ | ||
- name: Run tests | ||
working-directory: ./tests/pytest | ||
run: | | ||
set -euo pipefail | ||
pytest -v -rP ./*.py | ||
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
Oops, something went wrong.