mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-14 00:53:14 +00:00
add e2e test ci
This commit is contained in:
@@ -0,0 +1,76 @@
|
|||||||
|
name: e2e
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
timeout-minutes: 10
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
rust:
|
||||||
|
- stable
|
||||||
|
- beta
|
||||||
|
- nightly
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: cache protoc bin
|
||||||
|
id: cache-protoc-action
|
||||||
|
uses: actions/cache@v3
|
||||||
|
env:
|
||||||
|
cache-name: cache-protoc-action-bin
|
||||||
|
with:
|
||||||
|
path: /usr/local/bin/protoc
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-v0.0.1
|
||||||
|
|
||||||
|
- name: install protoc
|
||||||
|
if: steps.cache-protoc-action.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
wget https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protoc-27.0-linux-x86_64.zip
|
||||||
|
unzip protoc-27.0-linux-x86_64.zip -d protoc3
|
||||||
|
mv protoc3/bin/* /usr/local/bin/
|
||||||
|
chmod +x /usr/local/bin/protoc
|
||||||
|
rm -rf protoc-27.0-linux-x86_64.zip protoc3
|
||||||
|
|
||||||
|
- name: print protoc version
|
||||||
|
run: protoc --version
|
||||||
|
|
||||||
|
- name: cache flatc bin
|
||||||
|
id: cache-flatc-action
|
||||||
|
uses: actions/cache@v3
|
||||||
|
env:
|
||||||
|
cache-name: cache-flatc-action-bin
|
||||||
|
with:
|
||||||
|
path: /usr/local/bin/flatc
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-v0.0.1
|
||||||
|
|
||||||
|
- name: install flatc
|
||||||
|
if: steps.cache-flatc-action.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
wget https://github.com/google/flatbuffers/releases/download/v24.3.25/Linux.flatc.binary.g++-13.zip
|
||||||
|
unzip Linux.flatc.binary.g++-13.zip
|
||||||
|
mv flatc /usr/local/bin/
|
||||||
|
chmod +x /usr/local/bin/flatc
|
||||||
|
rm -rf Linux.flatc.binary.g++-13.zip
|
||||||
|
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: run fs
|
||||||
|
working-directory: packages/api
|
||||||
|
run: |
|
||||||
|
cargo run &
|
||||||
|
env:
|
||||||
|
PORT: 9000
|
||||||
|
|
||||||
|
- name: e2e test
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: -p e2e_test --lib
|
||||||
@@ -68,11 +68,13 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- name: cargo build
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- name: cargo test
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --all
|
args: --all --exclude e2e_test
|
||||||
|
|||||||
Reference in New Issue
Block a user