Skip to content

CI

CI #184

Workflow file for this run

name: CI
on:
pull_request:
branches: ['stable/**']
types: ['opened', 'reopened', 'synchronize']
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build
runs-on: self-hosted-amd64-1cpu
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.0.2
- name: Build image
run: make build
- name: Save image
run: docker save -o node.tar docker.io/wallarm/node:test
- name: Cache image
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6
with:
retention-days: 1
name: node.tar
path: node.tar
test:
name: Test
runs-on: self-hosted-amd64-2cpu
needs:
- build
strategy:
matrix:
case:
- single
- split
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.0.2
- name: Import secrets
uses: hashicorp/vault-action@affa6f04da5c2d55e6e115b7d1b044a6b1af8c74 # v2.7.4
id: secrets
with:
exportEnv: false
url: ${{ secrets.VAULT_URL }}
role: ${{ secrets.VAULT_ROLE }}
method: kubernetes
path: kubernetes-ci
secrets: |
kv-gitlab-ci/data/github/ingress api_token ;
kv-gitlab-ci/data/github/ingress user_secret ;
kv-gitlab-ci/data/github/ingress user_uuid ;
kv-gitlab-ci/data/github/shared/smoke-tests-registry-creds token_name ;
kv-gitlab-ci/data/github/shared/smoke-tests-registry-creds token_secret ;
kv-gitlab-ci/data/github/shared/smoke-tests-registry-creds registry_name ;
- name: Login
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
with:
registry: ${{ steps.secrets.outputs.registry_name }}
username: ${{ steps.secrets.outputs.token_name }}
password: ${{ steps.secrets.outputs.token_secret }}
- name: Load cache
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935
with:
name: node.tar
- name: Load images
run: docker load -i node.tar
- name: Run test
env:
USER_UUID: ${{ steps.secrets.outputs.user_uuid }}
USER_SECRET: ${{ steps.secrets.outputs.user_secret }}
WALLARM_API_TOKEN: ${{ steps.secrets.outputs.api_token }}
run: make ${{ matrix.case }}