mirror of
https://github.com/NexVeridian/ark-invest-api-rust-data.git
synced 2025-09-02 01:49:12 +00:00
1.1.4
This commit is contained in:
parent
3143ecf70d
commit
5f3c11efb1
2 changed files with 73 additions and 1 deletions
72
.github/workflows/nextest.yml
vendored
Normal file
72
.github/workflows/nextest.yml
vendored
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
# See workflow runs at https://github.com/nextest-rs/reuse-build-partition-example/actions/workflows/ci.yml.
|
||||||
|
|
||||||
|
name: nextest
|
||||||
|
|
||||||
|
on:
|
||||||
|
# pull_request:
|
||||||
|
# branches: [main]
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
schedule:
|
||||||
|
# Run this every day at 00:00 UTC.
|
||||||
|
- cron: 0 0 * * *
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-test-artifacts:
|
||||||
|
name: Build test artifacts
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
# By default actions/checkout checks out a merge commit. Check out the PR head instead.
|
||||||
|
# https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
# - uses: rui314/setup-mold@v1
|
||||||
|
- name: clang
|
||||||
|
run: sudo apt-get install -y musl-tools musl-dev libssl-dev clang mold
|
||||||
|
- name: Install nextest
|
||||||
|
uses: taiki-e/install-action@nextest
|
||||||
|
- name: Build and archive tests
|
||||||
|
run: cargo nextest archive --archive-file nextest-archive.tar.zst
|
||||||
|
- name: Upload archive to workflow
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: nextest-archive
|
||||||
|
path: nextest-archive.tar.zst
|
||||||
|
|
||||||
|
run-tests-partitioned:
|
||||||
|
name: Run tests with partitioning
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-test-artifacts
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
partition: [1, 2]
|
||||||
|
steps:
|
||||||
|
# The source directory must be checked out.
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
# By default actions/checkout checks out a merge commit. Check out the PR head instead.
|
||||||
|
# https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
# In this example, the Rust toolchain is not installed. cargo nextest's run phase does not
|
||||||
|
# require Cargo. You can choose to install Rust if your tests require it, of course.
|
||||||
|
# Instead, create ~/.cargo/bin as required by the install action.
|
||||||
|
- run: mkdir -p ~/.cargo/bin
|
||||||
|
- name: Install nextest
|
||||||
|
uses: taiki-e/install-action@nextest
|
||||||
|
- name: Download archive
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: nextest-archive
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
~/.cargo/bin/cargo-nextest nextest run --archive-file nextest-archive.tar.zst \
|
||||||
|
--partition count:${{ matrix.partition }}/2 \
|
||||||
|
-E "all() - test(get_api) - kind(bin)"
|
|
@ -46,7 +46,7 @@ fn csv_merge() -> Result<(), Box<dyn Error>> {
|
||||||
|
|
||||||
fn ark_plan(ticker: Ticker) -> Result<(), Box<dyn Error>> {
|
fn ark_plan(ticker: Ticker) -> Result<(), Box<dyn Error>> {
|
||||||
println!("Starting: {:#?}", ticker);
|
println!("Starting: {:#?}", ticker);
|
||||||
let sec = Duration::from_secs(rand::thread_rng().gen_range(5 * 60..=30 * 60));
|
let sec = Duration::from_secs(rand::thread_rng().gen_range(30 * 60..=4* 60 * 60));
|
||||||
// sleep(sec).await;
|
// sleep(sec).await;
|
||||||
thread::sleep(sec);
|
thread::sleep(sec);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue