Skip to content

Commit

Permalink
Merge branch 'main' into test/cap-nonce
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenj committed Sep 13, 2024
2 parents 2631ff3 + 1b24d56 commit 562b524
Show file tree
Hide file tree
Showing 87 changed files with 4,120 additions and 1,550 deletions.
1 change: 0 additions & 1 deletion .config/rustdoc.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# TODO: Enable these docs flags.
# RUSTDOCFLAGS=-D rustdoc::broken-intra-doc-links -D missing_docs -D rustdoc::missing_crate_level_docs
RUSTDOCFLAGS=-D rustdoc::invalid_codeblock_attributes -D rustdoc::invalid_html_tags -D rustdoc::invalid_rust_codeblocks -D rustdoc::bare_urls

5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ jobs:
working-directory: "C:\\${{ github.event.repository.name }}"
run: choco install -y protoc openssl sqlite postgresql14

- uses: actions/upload-artifact@v4
with:
name: choco_logs
path: C:\ProgramData\chocolatey\logs\*

- name: Set PostgreSQL env variables
working-directory: "C:\\${{ github.event.repository.name }}"
shell: powershell
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
pull_request:
branches:
- main
- fix-earthly-integration-testing

permissions:
id-token: write
Expand Down Expand Up @@ -41,4 +40,4 @@ jobs:
env:
EARTHLY_SECRETS: "IDEASCALE_EMAIL=${{ secrets.IDEASCALE_EMAIL }}, IDEASCALE_PASSWORD=${{ secrets.IDEASCALE_PASSWORD }}, IDEASCALE_API_TOKEN=${{ secrets.IDEASCALE_API_TOKEN }}"
run: |
earthly -P --buildkit-host "tcp://${{ secrets.EARTHLY_SATELLITE_ADDRESS }}:8372" +test
earthly -P --buildkit-host "tcp://${{ secrets.EARTHLY_SATELLITE_ADDRESS }}:8372" +test-all
114 changes: 13 additions & 101 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,110 +2,22 @@ name: CI

on:
push:
branches:
- main
paths:
- ".github/workflows/ci.yml"
- "containers/**"
- "services/**"
- "src/**"
- "utilities/**"

permissions:
id-token: write
contents: read
contents: write
packages: write

env:
AWS_REGION: eu-central-1
AWS_ROLE_ARN: arn:aws:iam::332405224602:role/ci
EARTHLY_TARGET: docker
EARTHLY_VERSION: 0.7.6
ECR_REGISTRY: 332405224602.dkr.ecr.eu-central-1.amazonaws.com
TAG: ${{ github.sha }}

jobs:
discover:
runs-on: ubuntu-latest
outputs:
json: ${{ steps.discover.outputs.json}}
images: ${{ steps.discover.outputs.images}}
steps:
- uses: actions/checkout@v3
- name: Setup CI
uses: input-output-hk/catalyst-ci/actions/setup@master
with:
aws_role_arn: ${{ env.AWS_ROLE_ARN }}
aws_region: ${{ env.AWS_REGION }}
earthly_version: ${{ env.EARTHLY_VERSION }}
- name: Discover Earthfiles
uses: input-output-hk/catalyst-ci/actions/discover@master
id: discover
with:
parse_images: "true"
targets: ${{ env.EARTHLY_TARGET }}
cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup CI
uses: input-output-hk/catalyst-ci/actions/setup@master
with:
aws_role_arn: ${{ env.AWS_ROLE_ARN }}
aws_region: ${{ env.AWS_REGION }}
earthly_version: ${{ env.EARTHLY_VERSION }}
- name: Build cache
uses: input-output-hk/catalyst-ci/actions/build@master
with:
earthfile: .
earthly_satellite: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
target: builder
build:
runs-on: ubuntu-latest
needs: [cache, discover]
strategy:
fail-fast: false
matrix:
earthfile: ${{ fromJson(needs.discover.outputs.json) }}
steps:
- uses: actions/checkout@v3
- name: Setup CI
uses: input-output-hk/catalyst-ci/actions/setup@master
with:
aws_role_arn: ${{ env.AWS_ROLE_ARN }}
aws_region: ${{ env.AWS_REGION }}
earthly_version: ${{ env.EARTHLY_VERSION }}
- name: Login to ECR
uses: docker/login-action@v2
with:
registry: ${{ env.ECR_REGISTRY }}
- name: Build and publish
uses: input-output-hk/catalyst-ci/actions/build@master
with:
earthfile: ${{ matrix.earthfile.path }}
earthly_satellite: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
images: ${{ matrix.earthfile.images }}
publish: "true"
registry: ${{ env.ECR_REGISTRY }}
tags: "${{ env.TAG }}"
target: ${{ env.EARTHLY_TARGET }}
deploy:
runs-on: ubuntu-latest
needs: [discover, build]
steps:
- name: Setup CI
uses: input-output-hk/catalyst-ci/actions/setup@master
id: setup
with:
aws_role_arn: ${{ env.AWS_ROLE_ARN }}
aws_region: ${{ env.AWS_REGION }}
earthly_version: ${{ env.EARTHLY_VERSION }}
- name: Deploy
uses: input-output-hk/catalyst-ci/actions/deploy@master
with:
deployment_repo: input-output-hk/catalyst-world
# NOTE: For new services being deployed, this list must be updated
images: cat-data-service fragment-exporter migrations voting-node
environment: dev
tag: ${{ env.TAG }}
token: ${{ steps.setup.outputs.token }}
ci:
uses: input-output-hk/catalyst-ci/.github/workflows/ci.yml@master
with:
aws_ecr_registry: 332405224602.dkr.ecr.eu-central-1.amazonaws.com
aws_role_arn: arn:aws:iam::332405224602:role/ci
aws_region: eu-central-1
publish_docs: false
secrets:
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
earthly_runner_address: ${{ secrets.EARTHLY_SATELLITE_ADDRESS }}
earthly_runner_secret: ${{ secrets.EARTHLY_RUNNER_SECRET }}
99 changes: 0 additions & 99 deletions .github/workflows/nix.yml

This file was deleted.

22 changes: 11 additions & 11 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ jobs:
uses: taiki-e/install-action@nextest

- name: Install cargo-make
run: cargo install --force cargo-make
run: cargo install --force cargo-make --version 0.37.10 --locked

- name: Install refinery
run: cargo install refinery_cli
run: cargo install refinery_cli --version 0.8.7 --locked

- name: Install dependencies
run:
Expand Down Expand Up @@ -268,16 +268,16 @@ jobs:
--exclude wallet-uniffi \
--archive-file nextest-archive.tar.zst
- name: Run Catalyst Core tests
env:
TEST_DATABASE_URL: postgres://postgres:123456@localhost
EVENT_DB_URL: postgres://catalyst-event-dev:CHANGE_ME@localhost/CatalystEventDev
## - name: Run Catalyst Core tests
## env:
## TEST_DATABASE_URL: postgres://postgres:123456@localhost
## EVENT_DB_URL: postgres://catalyst-event-dev:CHANGE_ME@localhost/CatalystEventDev
## removing test ui_test because of bug https://github.com/rust-lang/cargo/issues/10352
run: |
cargo nextest run \
-E "not (test(ui_test))" \
--archive-file nextest-archive.tar.zst --extract-to ${{ github.workspace }} \
--extract-overwrite --partition hash:${{ matrix.partition }}/10 --profile ci
## run: |
## cargo nextest run \
## -E "not (test(ui_test))" \
## --archive-file nextest-archive.tar.zst --extract-to ${{ github.workspace }} \
## --extract-overwrite --partition hash:${{ matrix.partition }}/10 --profile ci

test-results:
if: always()
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,8 @@ tests/tmp/
lefthook.yml
treefmt.toml

# local earthly Environments
local/*
# local earthly environments
local/*
tests/wallet-automation/typhon/usrdatadir/*
tests/wallet-automation/node_modules/*
tests/wallet-automation/typhon/extensions/*
Loading

0 comments on commit 562b524

Please sign in to comment.