Bump mockito from 1.1.0 to 1.2.0 #4176
Workflow file for this run
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
name: CI | |
on: [push, pull_request] | |
jobs: | |
linter-backend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
components: clippy, rustfmt | |
override: true | |
- name: Run clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-targets --all-features -- --deny warnings | |
- name: Run rustfmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
tests-database: | |
runs-on: ubuntu-latest | |
container: | |
image: artifacthub/db-tests | |
services: | |
postgres: | |
image: artifacthub/postgres | |
env: | |
POSTGRES_USER: tests | |
POSTGRES_PASSWORD: tests | |
POSTGRES_DB: tests | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Apply database migrations | |
working-directory: ./database/migrations | |
run: TERN_CONF=../../../.github/workflows/tern.conf PGPORT=${{ job.services.postgres.ports[5432] }} ./migrate.sh | |
- name: Install pgtap database extension | |
run: PGPASSWORD=tests psql -h postgres -p ${{ job.services.postgres.ports[5432] }} -U tests tests -c 'create extension pgtap;' | |
- name: Run database tests | |
working-directory: ./database/tests | |
run: PGPASSWORD=tests pg_prove --host postgres --dbname tests --username tests --verbose schema/*.sql functions/*/*.sql | |
tests-backend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Run backend tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
tests-frontend: | |
runs-on: ubuntu-latest | |
env: | |
NODE_OPTIONS: --max_old_space_size=4096 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
with: | |
path: ./web/node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
working-directory: ./web | |
run: yarn install --network-concurrency 1 | |
- name: Run prettier | |
working-directory: ./web | |
run: yarn format:diff | |
- name: Run eslint | |
working-directory: ./web | |
run: yarn lint | |
- name: Run frontend tests | |
working-directory: ./web | |
run: yarn test --watchAll=false --passWithNoTests --verbose --maxWorkers=4 | |
build-dbmigrator-image: | |
if: github.ref == 'refs/heads/main' | |
needs: | |
- linter-backend | |
- tests-database | |
- tests-backend | |
- tests-frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-2 | |
- name: Login to AWS ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Build and push dbmigrator image | |
env: | |
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
run: | | |
docker build -f database/migrations/Dockerfile -t $ECR_REGISTRY/dbmigrator:$GITHUB_SHA . | |
docker push $ECR_REGISTRY/dbmigrator:$GITHUB_SHA | |
build-apiserver-image: | |
if: github.ref == 'refs/heads/main' | |
needs: | |
- linter-backend | |
- tests-database | |
- tests-backend | |
- tests-frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-2 | |
- name: Login to AWS ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Build and push apiserver image | |
env: | |
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
run: | | |
docker build -f clomonitor-apiserver/Dockerfile -t $ECR_REGISTRY/apiserver:$GITHUB_SHA . | |
docker push $ECR_REGISTRY/apiserver:$GITHUB_SHA | |
build-archiver-image: | |
if: github.ref == 'refs/heads/main' | |
needs: | |
- linter-backend | |
- tests-database | |
- tests-backend | |
- tests-frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-2 | |
- name: Login to AWS ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Build and push image | |
env: | |
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
run: | | |
docker build -f clomonitor-archiver/Dockerfile -t $ECR_REGISTRY/archiver:$GITHUB_SHA . | |
docker push $ECR_REGISTRY/archiver:$GITHUB_SHA | |
build-linter-image: | |
if: github.ref == 'refs/heads/main' | |
needs: | |
- linter-backend | |
- tests-database | |
- tests-backend | |
- tests-frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Login to AWS Public ECR | |
uses: docker/login-action@v2 | |
with: | |
registry: public.ecr.aws | |
username: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Build and push image | |
run: | | |
docker build -f clomonitor-linter/Dockerfile -t public.ecr.aws/g6m3a0y9/linter:latest . | |
docker push public.ecr.aws/g6m3a0y9/linter:latest | |
build-notifier-image: | |
if: github.ref == 'refs/heads/main' | |
needs: | |
- linter-backend | |
- tests-database | |
- tests-backend | |
- tests-frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-2 | |
- name: Login to AWS ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Build and push image | |
env: | |
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
run: | | |
docker build -f clomonitor-notifier/Dockerfile -t $ECR_REGISTRY/notifier:$GITHUB_SHA . | |
docker push $ECR_REGISTRY/notifier:$GITHUB_SHA | |
build-registrar-image: | |
if: github.ref == 'refs/heads/main' | |
needs: | |
- linter-backend | |
- tests-database | |
- tests-backend | |
- tests-frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-2 | |
- name: Login to AWS ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Build and push image | |
env: | |
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
run: | | |
docker build -f clomonitor-registrar/Dockerfile -t $ECR_REGISTRY/registrar:$GITHUB_SHA . | |
docker push $ECR_REGISTRY/registrar:$GITHUB_SHA | |
build-tracker-image: | |
if: github.ref == 'refs/heads/main' | |
needs: | |
- linter-backend | |
- tests-database | |
- tests-backend | |
- tests-frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-2 | |
- name: Login to AWS ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: Build and push image | |
env: | |
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
run: | | |
docker build -f clomonitor-tracker/Dockerfile -t $ECR_REGISTRY/tracker:$GITHUB_SHA . | |
docker push $ECR_REGISTRY/tracker:$GITHUB_SHA |