-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (67 loc) · 2.25 KB
/
pr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: PR
on:
pull_request:
branches:
- '*'
jobs:
test:
name: cargo test
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:latest
ports:
- 27017:27017
options: >-
--health-cmd="mongosh --eval 'db.adminCommand({ ping: 1 })'"
--health-interval=30s
--health-timeout=10s
--health-retries=10
redis:
image: redis:latest
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
- run: cargo test --all-features
env:
BUNGEE_API_KEY: ${{ secrets.BUNGEE_API_KEY }}
COINGECKO_API_KEY: ${{ secrets.COINGECKO_API_KEY }}
COVALENT_API_KEY: ${{ secrets.COVALENT_API_KEY }}
ETHEREUM_RPC_URL: ${{ secrets.ETHEREUM_RPC_URL }}
ARBITRUM_RPC_URL: ${{ secrets.ARBITRUM_RPC_URL }}
OPTIMISM_RPC_URL: ${{ secrets.OPTIMISM_RPC_URL }}
BASE_RPC_URL: ${{ secrets.BASE_RPC_URL }}
MONGO_URL: ${{ secrets.MONGO_URL }}
REDIS_URL: ${{ secrets.REDIS_URL }}
environment: Testing
container_img_build_push_gar:
needs: [ test ]
# Allow the job to fetch a GitHub ID token
permissions:
id-token: write
contents: read
# The plan is to build and push each docker image in parallel.
strategy:
matrix:
image:
- us-docker.pkg.dev/biconomy-prod/biconomy-prod/reflux
# LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY/IMAGE
# {owner}/{repo}/.github/workflows/{filename}@{ref}
uses: bcnmy/devops/.github/workflows/container_img_build_push_gar.yaml@master
with:
image: ${{ matrix.image }}
dockerfile: Dockerfile
# GCP project where the identity provider is
# gcloud projects describe prj-workload-identity-001
gcp_project_number: '766873424314'
gcp_pool_id: 'pool-id-github-actions'
# gcp_provider_id: 'ga-GITHUB_REPO_NAME'
gcp_provider_id: 'ga-reflux'
# LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY/IMAGE
gcp_registry: 'us-docker.pkg.dev/biconomy-prod/biconomy-prod/reflux'
gcp_service_account: '[email protected]'