Skip to content

chore(deps): update all non-major dependencies #445

chore(deps): update all non-major dependencies

chore(deps): update all non-major dependencies #445

Workflow file for this run

name: ci
on:
push:
branches: [master]
release:
types: [created]
pull_request:
branches: [master]
# Declare default permissions as read only.
permissions: read-all
jobs:
build:
uses: miracum/.github/.github/workflows/standard-build.yaml@440b93677bc4fb05548dba758734fa770ddcd754 # v1.4.4
permissions:
contents: read
id-token: write
packages: write
pull-requests: write
actions: read
security-events: write
with:
enable-build-test-layer: true
enable-upload-test-image: true
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
add-code-coverage:
runs-on: ubuntu-22.04
needs:
- build
permissions:
# for add Coverage PR Comment
pull-requests: write
steps:
- name: Download test image
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: test-image
path: /tmp
- name: Load test image
run: |
ls -lsa /tmp
docker load --input /tmp/image-test.tar
docker image ls
- name: Copy unit test coverage reports from test container
env:
UNIT_TEST_IMAGE: ${{ fromJson(needs.build.outputs.test-image-meta-json).tags[0] }}
run: |
docker create --name=unit-test-container "${UNIT_TEST_IMAGE}"
docker cp unit-test-container:/build/src/Vfps.Tests/coverage ./coverage
- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # tag=v1.3.0
with:
filename: coverage/**/coverage.cobertura.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: "50 50"
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd # v2.8.0
if: ${{ github.event_name == 'pull_request' }}
with:
recreate: true
path: code-coverage-results.md
test-api:
name: test api
runs-on: ubuntu-22.04
needs:
- build
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Download container image
if: ${{ github.event_name == 'pull_request' }}
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: container-image
path: /tmp
- name: Load image
if: ${{ github.event_name == 'pull_request' }}
run: |
ls -lar /tmp
docker load --input /tmp/image.tar
docker image ls -a
- name: Install grpcurl
working-directory: /tmp
env:
GRPCURL_URL: https://github.com/fullstorydev/grpcurl/releases/download/v1.8.7/grpcurl_1.8.7_linux_x86_64.tar.gz
run: |
curl -LSs "$GRPCURL_URL" | tar xz && \
mv ./grpcurl /usr/local/bin/grpcurl && \
chmod +x /usr/local/bin/grpcurl && \
grpcurl --version
- name: Install ghz
working-directory: /tmp
env:
GHZ_URL: https://github.com/bojand/ghz/releases/download/v0.110.0/ghz-linux-x86_64.tar.gz
run: |
curl -LSs "$GHZ_URL" | tar xz && \
mv ./ghz /usr/local/bin/ghz && \
chmod +x /usr/local/bin/ghz && \
ghz --version
- name: Start compose deployment
env:
VFPS_IMAGE_TAG: ${{ needs.build.outputs.image-version }}
run: |
echo "Using VFPS image tag ${VFPS_IMAGE_TAG}"
docker compose -f docker-compose.yaml --profile=test up -d
- name: Wait for the healthz endpoint to be ready
run: |
curl --fail --retry 5 --retry-all-errors --connect-timeout 30 --max-time 60 --retry-delay 10 http://127.0.0.1:8080/healthz
- name: Create a namespace for testing
run: |
grpcurl \
-plaintext \
-import-path src/Vfps/ \
-proto src/Vfps/Protos/vfps/api/v1/namespaces.proto \
-d '{"name": "test", "pseudonymGenerationMethod": "PSEUDONYM_GENERATION_METHOD_SECURE_RANDOM_BASE64URL_ENCODED", "pseudonymLength": 32}' \
127.0.0.1:8081 \
vfps.api.v1.NamespaceService/Create
- name: Create pseudonyms from random inputs
run: |
ghz -n 5000 \
--cpus 1 \
--insecure \
--import-paths src/Vfps/ \
--proto src/Vfps/Protos/vfps/api/v1/pseudonyms.proto \
--call vfps.api.v1.PseudonymService/Create \
-d '{"originalValue": "{{randomString 32}}", "namespace": "test"}' \
127.0.0.1:8081 | tee ghz-output.txt
- name: Enhance ghz output for use as a PR comment
run: |
GHZ_OUTPUT_TXT=$(cat ghz-output.txt)
{
echo -e '---';
echo -e '## ghz run statistics';
echo -e '```console';
echo -e "${GHZ_OUTPUT_TXT}";
echo -e '```'
} >> ghz-output.md
- name: Append sticky comment with ghz output
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd # v2.8.0
if: ${{ github.event_name == 'pull_request' }}
with:
append: true
path: ghz-output.md
- name: Print compose logs
if: always()
run: |
docker compose --profile=test -f docker-compose.yaml logs
docker compose --profile=test down --volumes --remove-orphans
test-migrations:
name: test migrations
runs-on: ubuntu-22.04
permissions:
contents: read
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Download container image
if: ${{ github.event_name == 'pull_request' }}
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: container-image
path: /tmp
- name: Load image
if: ${{ github.event_name == 'pull_request' }}
run: |
ls -lar /tmp
docker load --input /tmp/image.tar
docker image ls -a
- name: Install .NET
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # tag=v4.0.0
with:
dotnet-version: "8.0.x"
- name: Run migrations tests
env:
VFPS_IMAGE_TAG: ${{ needs.build.outputs.image-version }}
run: dotnet test src/Vfps.IntegrationTests --configuration=Release -l "console;verbosity=detailed"
test-iter8:
name: iter8 tests
runs-on: ubuntu-22.04
if: ${{ github.event_name == 'pull_request' }}
needs:
- build
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: install iter8 cli
env:
ITER8_CLI_URL: "https://github.com/iter8-tools/iter8/releases/download/v0.13.18/iter8-linux-amd64.tar.gz"
run: |
curl -LSs "${ITER8_CLI_URL}" | tar xz
mv linux-amd64/iter8 /usr/local/bin/iter8
chmod +x /usr/local/bin/iter8
iter8 version
- name: Create KinD cluster
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
with:
cluster_name: kind
- name: Download container image
if: ${{ github.event_name == 'pull_request' }}
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: container-image
path: /tmp
- name: Load image into KinD
run: |
# vfps api image
kind load image-archive /tmp/image.tar
- name: List images in cluster
run: docker exec kind-control-plane crictl images
- name: Install vfps
env:
IMAGE_TAG: ${{ needs.build.outputs.image-version }}
run: |
helm install \
--set="image.tag=${IMAGE_TAG}" \
-f tests/iter8/values.yaml \
--wait \
--timeout=15m \
vfps oci://ghcr.io/miracum/charts/vfps
- name: Launch iter8 experiment
run: kubectl apply -f tests/iter8/experiment.yaml
- name: Wait for experiment completion
run: iter8 k assert -c completed --timeout 10m
- name: Assert no failures and SLOs are satisfied
run: iter8 k assert -c nofailure,slos
- name: Create iter8 reports
if: always()
run: |
iter8 k report | tee iter8-report.txt
iter8 k report -o html > iter8-report.html
- name: Enhance iter8 report output for use as a PR comment
run: |
ITER8_REPORT_TXT=$(cat iter8-report.txt)
{
echo -e '---';
echo -e '## iter8 report';
echo -e '```console';
echo -e "${ITER8_REPORT_TXT}";
echo -e '```'
} >> iter8-output.md
- name: Append sticky comment with iter8 report
uses: marocchino/sticky-pull-request-comment@efaaab3fd41a9c3de579aba759d2552635e590fd # v2.8.0
if: ${{ github.event_name == 'pull_request' }}
with:
append: true
path: iter8-output.md
- name: Upload report
if: always()
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: iter8-report.html
path: |
iter8-report.html
- name: Print cluster and iter8 logs
if: always()
run: |
kubectl cluster-info dump -o yaml | tee kind-cluster-dump.txt
iter8 k log -l trace
- name: Upload cluster dump
if: always()
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: kind-cluster-dump.txt
path: |
kind-cluster-dump.txt
lint:
uses: miracum/.github/.github/workflows/standard-lint.yaml@440b93677bc4fb05548dba758734fa770ddcd754 # v1.4.4
permissions:
contents: read
pull-requests: write
issues: write
security-events: write
actions: read
with:
dotnet-version: "8.0.x"
enable-verify-base-image-signature: false
enable-validate-gradle-wrapper: false
codeql-languages: '["csharp"]'
enable-codeql: true
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}