2022-07-29 14:36:09 +00:00
|
|
|
name: Monero Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- develop
|
|
|
|
paths:
|
|
|
|
- "coins/monero/**"
|
2023-03-20 01:05:05 +00:00
|
|
|
- "processor/**"
|
2022-07-29 14:36:09 +00:00
|
|
|
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- "coins/monero/**"
|
2023-03-20 01:05:05 +00:00
|
|
|
- "processor/**"
|
2022-07-29 14:36:09 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
# Only run these once since they will be consistent regardless of any node
|
|
|
|
unit-tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Test Dependencies
|
|
|
|
uses: ./.github/actions/test-dependencies
|
2023-01-01 09:09:10 +00:00
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-07-29 14:36:09 +00:00
|
|
|
|
|
|
|
- name: Run Unit Tests Without Features
|
|
|
|
run: cargo test --package monero-serai --lib
|
|
|
|
|
2022-07-30 08:49:55 +00:00
|
|
|
# Doesn't run unit tests with features as the tests workflow will
|
2022-07-29 14:36:09 +00:00
|
|
|
|
|
|
|
integration-tests:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
# Test against all supported protocol versions
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-03-20 05:07:43 +00:00
|
|
|
version: [v0.17.3.2, v0.18.2.0]
|
2022-07-29 14:36:09 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Test Dependencies
|
|
|
|
uses: ./.github/actions/test-dependencies
|
|
|
|
with:
|
2023-01-01 09:09:10 +00:00
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-07-29 14:36:09 +00:00
|
|
|
monero-version: ${{ matrix.version }}
|
|
|
|
|
|
|
|
- name: Run Integration Tests Without Features
|
2022-07-30 08:49:55 +00:00
|
|
|
# https://github.com/rust-lang/cargo/issues/8396
|
2022-07-29 14:36:09 +00:00
|
|
|
run: cargo test --package monero-serai --test '*'
|
|
|
|
|
|
|
|
- name: Run Integration Tests
|
2022-07-30 08:49:55 +00:00
|
|
|
# Don't run if the the tests workflow also will
|
2023-03-20 05:07:43 +00:00
|
|
|
if: ${{ matrix.version != 'v0.18.2.0' }}
|
2022-07-30 08:49:55 +00:00
|
|
|
run: |
|
|
|
|
cargo test --package monero-serai --all-features --test '*'
|
2023-03-17 17:33:50 +00:00
|
|
|
cargo test --package processor --all-features monero
|