mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-22 23:08:04 +00:00
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: Backend CI
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- '.github/workflows/**'
|
|
- 'backend/**'
|
|
- '!frontend/**'
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Build telemetry executables (in debug mode)
|
|
working-directory: ./backend
|
|
run: cargo build --bins --verbose
|
|
|
|
- name: Run tests
|
|
working-directory: ./backend
|
|
run: cargo test --verbose
|
|
|
|
- name: Build, release and call telemetry executable
|
|
working-directory: ./backend
|
|
run: cargo run --bin telemetry_core --release -- --help
|
|
|
|
- name: Build, release and call shard executable
|
|
working-directory: ./backend
|
|
run: cargo run --bin telemetry_shard --release -- --help
|
|
|
|
- name: Login to Dockerhub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Build and push template image for tagged commit
|
|
uses: docker/build-push-action@v2 # https://github.com/docker/build-push-action
|
|
with:
|
|
context: './backend'
|
|
push: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
tags: parity/substrate-telemetry-backend:latest
|
|
# add_git_labels: true
|