Skip to content

Commit

Permalink
chore: check client
Browse files Browse the repository at this point in the history
  • Loading branch information
appflowy committed Dec 8, 2024
1 parent 3d23cc7 commit 2a93680
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/stress_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,79 +20,35 @@ jobs:
runs-on: self-hosted-appflowy3

steps:
- name: Verify Author is a Member of the Organization
id: check_membership
run: |
echo "skip_ci=false" >> $GITHUB_ENV
ORG_NAME="AppFlowy-IO"
echo "Fetching members of organization: $ORG_NAME"
RESPONSE=$(curl -s \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/orgs/$ORG_NAME/members")
echo "Organization Members:"
echo "$RESPONSE" | jq '.[].login' || echo "No members found or access denied."
# ORG_NAME="AppFlowy-IO"
# AUTHOR="${{ github.actor }}"
# echo "Checking if $AUTHOR is a member of $ORG_NAME..."
#
# RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" \
# -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
# "https://api.github.com/orgs/$ORG_NAME/members/$AUTHOR")
#
# if [ "$RESPONSE" == "200" ]; then
# echo "✅ $AUTHOR is a member of $ORG_NAME. Proceeding..."
# else
# echo "⚠️ $AUTHOR is not a member of $ORG_NAME. Skipping CI."
# echo "skip_ci=true" >> $GITHUB_ENV
# fi
shell: bash

- name: Skip Job
if: env.skip_ci == 'true'
run: |
echo "Skipping the CI job as the author is not a member of the organization."
shell: bash

# Step 3: Checkout Repository
- name: Checkout Repository
if: env.skip_ci != 'true'
uses: actions/checkout@v3

- name: Install Rust Toolchain
if: env.skip_ci != 'true'
uses: dtolnay/rust-toolchain@stable

- name: Cache Rust Dependencies
if: env.skip_ci != 'true'
uses: Swatinem/rust-cache@v2
with:
workspaces: "AppFlowy-Cloud"

- name: Copy and Rename deploy.env to .env
if: env.skip_ci != 'true'
run: cp deploy.env .env

- name: Replace Values in .env
if: env.skip_ci != 'true'
run: |
sed -i '' 's|RUST_LOG=.*|RUST_LOG=trace|' .env
shell: bash

- name: Start Docker Compose Services
if: env.skip_ci != 'true'
run: |
docker compose -f docker-compose-stress-test.yml up -d
docker ps -a
- name: Install Prerequisites
if: env.skip_ci != 'true'
run: |
brew install protobuf
- name: Run Server and Test
if: env.skip_ci != 'true'
run: |
cargo run --package xtask -- --stress-test

0 comments on commit 2a93680

Please sign in to comment.