chore: Lowered main-net time gas per time alarm #326
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: "Price Feeder & Alarms Dispatcher CI" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
tags: | |
- "*" | |
pull_request: | |
branches: | |
- "main" | |
paths-ignore: | |
- "README.md" | |
permissions: | |
packages: "write" | |
jobs: | |
check_formatting: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "nolus-protocol/rust-ci-actions/rust_cache@main" | |
with: | |
update_and_cache_toolchains: "true" | |
- uses: "nolus-protocol/rust-ci-actions/check_formatting@main" | |
check_codebase: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "nolus-protocol/rust-ci-actions/rust_cache@main" | |
with: | |
update_and_cache_toolchains: "true" | |
- uses: "nolus-protocol/rust-ci-actions/check_codebase@main" | |
# audit_dependencies: | |
# runs-on: "ubuntu-latest" | |
# steps: | |
# - uses: "actions/checkout@v4" | |
# - uses: "nolus-protocol/rust-ci-actions/rust_cache@main" | |
# with: | |
# update_and_cache_toolchains: "true" | |
# - uses: "nolus-protocol/rust-ci-actions/audit_dependencies@main" | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "nolus-protocol/rust-ci-actions/rust_cache@main" | |
with: | |
update_and_cache_toolchains: "true" | |
- name: "Run clippy" | |
shell: "sh" | |
run: "cargo clippy -- -F unsafe_code -D warnings" | |
code_coverage: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "nolus-protocol/rust-ci-actions/rust_cache@main" | |
with: | |
update_and_cache_toolchains: "true" | |
- uses: "nolus-protocol/rust-ci-actions/code_coverage@main" | |
test_release_profile: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "nolus-protocol/rust-ci-actions/rust_cache@main" | |
with: | |
update_and_cache_toolchains: "true" | |
- name: "Run tests in release profile" | |
shell: "sh" | |
run: "cargo test --release" | |
build: | |
runs-on: "ubuntu-latest" | |
needs: | |
- "check_formatting" | |
- "check_codebase" | |
# - "audit_dependencies" | |
- "linting" | |
- "code_coverage" | |
- "test_release_profile" | |
if: "github.ref_type == 'tag'" | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: "Build compiling image" | |
shell: "sh" | |
run: "docker build --rm -f Compile.Dockerfile -t compile ." | |
- name: "Compile binaries" | |
shell: "sh" | |
run: 'docker run -v "$(pwd):/code/" -v "$(pwd)/artifacts/:/artifacts/" --name compile compile' | |
- name: "Archive Alpine Linux feeder binary artifact" | |
uses: "actions/upload-artifact@v4" | |
with: | |
name: "alpine-linux-feeder" | |
path: "artifacts/feeder" | |
- name: "Archive Alpine Linux alarms dispatcher binary artifact" | |
uses: "actions/upload-artifact@v4" | |
with: | |
name: "alpine-linux-alarms-dispatcher" | |
path: "artifacts/alarms-dispatcher" | |
- name: "Build pre-configured Docker images for dev-net" | |
if: "github.ref_type == 'tag' || ${{ github.event_name }} == 'workflow_dispatch'" | |
uses: "./.github/actions/preconfigured_images" | |
with: | |
config: "dev" | |
github_token: "${{ secrets.GITHUB_TOKEN }}" | |
docker_registry: "ghcr.io" | |
docker_repository: "nolus-protocol" | |
docker_tag: "${{ github.ref_name }}" | |
- name: "Build pre-configured Docker images for test-net" | |
if: "github.ref_type == 'tag'" | |
uses: "./.github/actions/preconfigured_images" | |
with: | |
config: "test" | |
github_token: "${{ secrets.GITHUB_TOKEN }}" | |
docker_registry: "ghcr.io" | |
docker_repository: "nolus-protocol" | |
docker_tag: "${{ github.ref_name }}" | |
- name: "Build pre-configured Docker images for main-net" | |
if: "github.ref_type == 'tag'" | |
uses: "./.github/actions/preconfigured_images" | |
with: | |
config: "main" | |
github_token: "${{ secrets.GITHUB_TOKEN }}" | |
docker_registry: "ghcr.io" | |
docker_repository: "nolus-protocol" | |
docker_tag: "${{ github.ref_name }}" | |
release: | |
name: "draft_release" | |
runs-on: "ubuntu-latest" | |
needs: | |
- "build" | |
permissions: "write-all" | |
if: "github.ref_type == 'tag'" | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: "Download artifacts" | |
uses: "actions/download-artifact@v4" | |
- name: "Display structure of downloaded files" | |
run: "ls -R" | |
# temporary using commit as version until it is merged. Updates node version v12 -> v16 | |
- uses: "marvinpinto/action-automatic-releases@6273874b61ebc8c71f1a61b2d98e234cf389b303" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
draft: true | |
files: | | |
alpine-linux-alarms-dispatcher | |
alpine-linux-feeder | |
./configurations/ |