mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-22 23:08:04 +00:00
Un-brittle-ify backend E2E tests and have them run by default again in CI (#397)
* test running tests * Add delay so that core knows about node before feed subscribes to limit chance of race * move delaye to the right place * Don't do expensive docker step untill we will be pushing the image * docker test skipped as hoped, so push to 'true' * just remove docker steps in github CI entirely since they aren't needed by anything (gitlab CI does this stuff now) * run CI on pull requests too to catch PRs from forks
This commit is contained in:
@@ -6,6 +6,11 @@ on:
|
||||
- '.github/workflows/backend.yml'
|
||||
- 'backend/**'
|
||||
- '!frontend/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/backend.yml'
|
||||
- 'backend/**'
|
||||
- '!frontend/**'
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
@@ -37,27 +42,6 @@ jobs:
|
||||
- name: Build
|
||||
run: cargo check --all-targets
|
||||
|
||||
docker:
|
||||
name: Push tagged images to docker
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2.3.4
|
||||
|
||||
- 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
|
||||
|
||||
fmt:
|
||||
name: Run rustfmt
|
||||
runs-on: ubuntu-latest
|
||||
@@ -124,26 +108,3 @@ jobs:
|
||||
|
||||
- name: Cargo test
|
||||
run: cargo test --verbose --jobs 1
|
||||
|
||||
e2e:
|
||||
name: Run potentially brittle E2E tests
|
||||
continue-on-error: true
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: Install Rust stable toolchain
|
||||
uses: actions-rs/toolchain@v1.0.7
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v1.3.0
|
||||
with:
|
||||
working-directory: backend
|
||||
|
||||
- name: Cargo test
|
||||
run: cargo test --verbose --jobs 1 e2e -- --ignored
|
||||
|
||||
@@ -9,6 +9,11 @@ on:
|
||||
- '.github/workflows/frontend.yml'
|
||||
- 'frontend/**'
|
||||
- '!backend/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/frontend.yml'
|
||||
- 'frontend/**'
|
||||
- '!backend/**'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -41,18 +46,3 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
- name: Login to Dockerhub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and Push template image
|
||||
uses: docker/build-push-action@v2 # https://github.com/docker/build-push-action
|
||||
if: matrix.node-version == '12.x'
|
||||
with:
|
||||
context: './frontend'
|
||||
push: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
tags: parity/substrate-telemetry-frontend:latest
|
||||
# add_git_labels: true
|
||||
|
||||
Reference in New Issue
Block a user