chore(ci): remove CI test job
This commit is contained in:
@@ -6,42 +6,7 @@ on:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install SSH client
|
||||
run: apt-get update && apt-get install -y openssh-client
|
||||
- name: Test backend
|
||||
env:
|
||||
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
||||
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
||||
DEPLOY_SSH_PRIVATE_KEY_B64: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY_B64 }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
printf '%s' "$DEPLOY_SSH_PRIVATE_KEY_B64" | base64 -d > ~/.ssh/deploy_key
|
||||
chmod 600 ~/.ssh/deploy_key
|
||||
|
||||
tar \
|
||||
--exclude=.git \
|
||||
--exclude='**/bin' \
|
||||
--exclude='**/obj' \
|
||||
--exclude='**/node_modules' \
|
||||
--exclude=frontend/dist \
|
||||
--exclude=frontend/dist-ssr \
|
||||
-czf - . | ssh -i ~/.ssh/deploy_key -o StrictHostKeyChecking=accept-new "$DEPLOY_USER@$DEPLOY_HOST" \
|
||||
"set -Eeuo pipefail
|
||||
workdir=/tmp/socialize-ci/${{ gitea.sha }}
|
||||
rm -rf \"\$workdir\"
|
||||
mkdir -p \"\$workdir\"
|
||||
tar -xzf - -C \"\$workdir\"
|
||||
cd \"\$workdir\"
|
||||
find . -type d \( -name bin -o -name obj \) -prune -exec rm -rf {} +
|
||||
dotnet restore backend/Socialize.slnx
|
||||
dotnet test backend/Socialize.slnx --no-restore"
|
||||
|
||||
image:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user