Skip to content

Commit

Permalink
Merge pull request #18 from merutech/test-ci
Browse files Browse the repository at this point in the history
ci: Add compose file and tailscale test ci
  • Loading branch information
m1sk9 authored Jan 17, 2025
2 parents c9e7534 + 4d4d656 commit e7562b2
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to dev-m1sk9-s1
name: Deploy

on:
push:
Expand All @@ -19,7 +19,7 @@ jobs:
oauth-secret: ${{ secrets.TAILSCALE_OAUTH_SECRET }}
tags: tag:ci

- name: Deploy compose to dev-m1sk9-s1
- name: Deploy compose
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.SSH_HOST }}
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Test

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test-tailscale:
name: Test Tailscale connectivity
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TAILSCALE_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TAILSCALE_OAUTH_SECRET }}
tags: tag:ci

- name: Test Tailscale connectivity
run: |
tailscale ping --verbose --timeout 10s --c 5 --until-direct=false dev-m1sk9-s1
test-compose:
name: Test compose files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Testing compose files
run: |
for dir in $(find . -name 'compose.yaml' -exec dirname {} \;)
do
echo "Testing docker compose in $dir"
cd $dir
touch .env
docker compose config
cd -
done

0 comments on commit e7562b2

Please sign in to comment.