Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions .github/workflows/publish.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release-plz

permissions:
pull-requests: write
contents: write

on:
push:
branches:
- master

jobs:

# Release unpublished packages.
release-plz-release:
name: Release-plz release
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'jmjoy' }}
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: release-plz/action@v0.5
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

# Create a PR with the new versions and changelog, preparing the next release.
release-plz-pr:
name: Release-plz PR
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'jmjoy' }}
permissions:
contents: write
pull-requests: write
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: release-plz/action@v0.5
with:
command: release-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Docker compose
run: docker-compose up -d
run: docker compose up -d
- name: Build
run: cargo build --release --verbose ${{ matrix.features }}
- name: Test
Expand Down
2 changes: 2 additions & 0 deletions src/conf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ use reqwest::{Client, ClientBuilder};
use std::collections::HashMap;
use url::Url;

#[derive(Clone)]
enum ServerUrl {
ConfigServer(Url),
/// Todo implement fetch config via meta server.
Expand Down Expand Up @@ -176,6 +177,7 @@ impl ApolloConfClientBuilder {
}

/// Apollo configuration apis client.
#[derive(Clone)]
pub struct ApolloConfClient {
server_url: ServerUrl,
client: Client,
Expand Down
14 changes: 7 additions & 7 deletions tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ pub fn setup() {

#[allow(dead_code)]
fn setup_docker() {
let mut down = Command::new("docker-compose");
let output = down.arg("down").output().unwrap();
let mut down = Command::new("docker");
let output = down.arg("compose").arg("down").output().unwrap();
let down_stdout = String::from_utf8(output.stdout);
let down_stderr = String::from_utf8(output.stderr);
log::info!(
"docker-compose down, stdout: {:?}, stderr: {:?}",
"docker compose down, stdout: {:?}, stderr: {:?}",
down_stdout,
down_stderr
);
assert!(output.status.success());

let mut up = Command::new("docker-compose");
let output = up.arg("up").arg("-d").output().unwrap();
let mut up = Command::new("docker");
let output = up.arg("compose").arg("up").arg("-d").output().unwrap();
let up_stdout = String::from_utf8(output.stdout);
let up_stderr = String::from_utf8(output.stderr);
log::info!(
"docker-compose up -d, stdout: {:?}, stderr: {:?}",
"docker compose up -d, stdout: {:?}, stderr: {:?}",
up_stdout,
up_stderr
);
Expand Down Expand Up @@ -83,7 +83,7 @@ fn setup_docker() {
});

if !b {
panic!("docker-compose up failed");
panic!("docker compose up failed");
}
}

Expand Down