Use Option<&str>
instead of Option<String>, create request url through Url
's methods.
#478
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CICD | |
on: [push, pull_request] | |
env: | |
TARDIS_TEST_DISABLED_DOCKER: true | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql | |
ports: | |
- 3306:3306 | |
options: -e MYSQL_ROOT_PASSWORD=123456 -e MYSQL_DATABASE=test | |
postgres: | |
image: postgres:alpine | |
ports: | |
- 5432:5432 | |
options: -e POSTGRES_PASSWORD=123456 -e POSTGRES_DB=test | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
options: --entrypoint redis-server | |
rabbit: | |
image: rabbitmq:management | |
ports: | |
- 15672:15672 | |
- 25672:25672 | |
- 5671:5671 | |
- 5672:5672 | |
- 4369:4369 | |
options: -e RABBITMQ_DEFAULT_USER=guest -e RABBITMQ_DEFAULT_PASS=guest | |
es: | |
image: rapidfort/elasticsearch:7.17 | |
ports: | |
- 9200:9200 | |
options: -e ELASTICSEARCH_HEAP_SIZE=128m | |
# https://github.com/minio/minio/issues/10745 | |
minio: | |
image: minio/minio:edge-cicd | |
ports: | |
- 9000:9000 | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Init rust envrionment | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v1 | |
- name: Cache rust | |
uses: Swatinem/rust-cache@v2 | |
- name: Check format | |
run: cargo fmt --all -- --check | |
- name: Check clippy | |
run: cargo clippy --all --all-features | |
- name: Run test | |
run: cargo test --all-features | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: code-coverage-report | |
path: cobertura.xml | |
publish-macros: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [check] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Init rust envrionment | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Cargo login | |
run: cargo login ${{ secrets.CRATES_TOKEN }} | |
- name: Cargo package macros | |
working-directory: tardis-macros | |
run: cargo package | |
- name: Cargo publish macros | |
working-directory: tardis-macros | |
run: cargo publish | |
publish-tardis: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [check, publish-macros] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Init rust envrionment | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Cargo login | |
run: cargo login ${{ secrets.CRATES_TOKEN }} | |
- name: Cargo package tardis | |
working-directory: tardis | |
run: cargo package | |
- name: Cargo publish tardis | |
working-directory: tardis | |
run: cargo publish |