-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from merutech/test-ci
ci: Add compose file and tailscale test ci
- Loading branch information
Showing
2 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
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
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
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 |