Skip to content

fix: align glibc versions in the Dockerfile #1583

fix: align glibc versions in the Dockerfile

fix: align glibc versions in the Dockerfile #1583

Workflow file for this run

name: CI
on:
push:
workflow_dispatch:
inputs:
upload_artifacts:
description: "Upload artifacts"
type: boolean
required: true
default: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
lint_docker:
name: Lint Dockerfile
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Hadolint
run: |
curl -sSL https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64 -o hadolint
chmod +x hadolint
sudo mv hadolint /usr/local/bin/hadolint
- name: Lint Dockerfile
run: hadolint Dockerfile
build_and_test:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable]
fail-fast: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, rust-src, clippy
- name: Fast check
run: cargo check --workspace --all-targets --verbose
- name: Build
run: cargo build --workspace --release --verbose
- name: Test
timeout-minutes: 10
run: cargo test --workspace --lib --verbose
- name: Check formatting
run: cargo fmt --all -- --check
- name: Lint with Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Package binaries
if: github.event_name == 'workflow_dispatch' && github.event.inputs.upload_artifacts == 'true'
run: |
mkdir -p artifacts
cp target/release/blockfrost-platform* artifacts/
- name: Upload artifacts
if: github.event_name == 'workflow_dispatch' && github.event.inputs.upload_artifacts == 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-binary
path: artifacts/
platform_integration_tests:
name: Platform Integration Tests
runs-on: [self-hosted, Linux, X64, nixos]
needs: build_and_test
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run Integration Tests
timeout-minutes: 10
run: nix develop .# --command cargo test --verbose --test endpoints_test
blockfrost_integration_tests:
name: Blockfrost Integration Tests (${{ matrix.network }})
runs-on: [self-hosted, Linux, X64, nixos]
needs: build_and_test
strategy:
fail-fast: false
matrix:
include:
- network: preview
dolos_endpoint: http://127.0.0.1:3010
cardano_node_socket_path: /run/cardano-node/node.socket
project_id_secret: BLOCKFROST_PREVIEW_PROJECT_ID
submit_mnemonic_secret: BLOCKFROST_PREVIEW_SUBMIT_MNEMONIC
timeout_minutes: 5
- network: preprod
dolos_endpoint: http://127.0.0.1:3009
cardano_node_socket_path: /run/cardano-node/node_preprod.socket
project_id_secret: BLOCKFROST_PREPROD_PROJECT_ID
submit_mnemonic_secret: BLOCKFROST_PREPROD_SUBMIT_MNEMONIC
timeout_minutes: 5
- network: mainnet
dolos_endpoint: http://127.0.0.1:3008
cardano_node_socket_path: /run/cardano-node/node_mainnet.socket
project_id_secret: BLOCKFROST_MAINNET_PROJECT_ID
submit_mnemonic_secret: BLOCKFROST_MAINNET_SUBMIT_MNEMONIC
timeout_minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run Blockfrost Tests
continue-on-error: true
timeout-minutes: ${{ fromJSON(matrix.timeout_minutes) }}
env:
PROJECT_ID: ${{ secrets[matrix.project_id_secret] }}
SUBMIT_MNEMONIC: ${{ secrets[matrix.submit_mnemonic_secret] }}
DOLOS_ENDPOINT: ${{ matrix.dolos_endpoint }}
CARDANO_NODE_SOCKET_PATH: ${{ matrix.cardano_node_socket_path }}
run: |
nix run -L .#internal.x86_64-linux.blockfrost-tests-"${{ matrix.network }}"
hydra_against_blockfrost_tests:
name: Hydra tests of their `--blockfrost` option
runs-on: [self-hosted, Linux, X64, nixos]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run Hydra Tests
timeout-minutes: 15
env:
CARDANO_NODE_SOCKET_PATH: /run/cardano-node/node.socket
BLOCKFROST_PROJECT_ID: ${{ secrets.BLOCKFROST_TESTS_PROJECT_ID }}
SUBMIT_MNEMONIC: ${{ secrets.BLOCKFROST_TESTS_SUBMIT_MNEMONIC }}
run: |
nix run -L .#internal.x86_64-linux.hydra-test
coverage:
name: Coverage
runs-on: ubuntu-latest
needs: build_and_test
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin
- name: Generate coverage report
timeout-minutes: 10
run: cargo tarpaulin --workspace --all --lib --features tarpaulin --out html --output-dir coverage --fail-under 11
- name: Upload coverage report for GitHub Pages
uses: actions/upload-artifact@v4
with:
name: coverage-html
path: coverage/
pages:
name: Prepare coverage for GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
needs: coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure Pages
uses: actions/configure-pages@v3
- name: Download coverage artifact
uses: actions/download-artifact@v4
with:
name: coverage-html
path: coverage
- name: Copy to index.html
run: cp coverage/tarpaulin-report.html coverage/index.html
- name: Upload coverage folder
uses: actions/upload-pages-artifact@v3
with:
path: coverage/
deploy:
name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
needs: pages
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Deploy
uses: actions/deploy-pages@v4