test: network diagnostic tests #1091
This file contains hidden or 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
| --- | |
| name: Task Acceptance Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| task_acceptance_tests: | |
| name: On ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ 'ubuntu-20.04', 'rocky-8' ] | |
| env: | |
| ruby_version: '3.1' | |
| GEM_BOLT: true | |
| BEAKER_debug: true | |
| BEAKER_set: docker/${{ matrix.os }} | |
| runs-on: 'ubuntu-latest' | |
| steps: | |
| - name: Connect to Twingate | |
| uses: twingate/github-action@v1 | |
| with: | |
| service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }} | |
| env: | |
| TWINGATE_LOG_LEVEL: debug | |
| - name: Fix dns | |
| run: | | |
| echo "=== Remove Azure DNS from eth0 interface ===" | |
| sudo systemd-resolve --interface=eth0 --set-dns="" | |
| echo "=== Configure Twingate DNS properly ===" | |
| sudo systemd-resolve --interface=sdwan0 --set-dns=100.95.0.251 --set-dns=100.95.0.252 --set-domain=delivery.puppetlabs.net | |
| echo "=== Flush DNS cache ===" | |
| sudo systemd-resolve --flush-caches | |
| echo "=== Check new configuration ===" | |
| resolvectl status | |
| echo "=== Test DNS resolution ===" | |
| nslookup artifactory.delivery.puppetlabs.net | |
| - name: Checkout current PR code | |
| uses: actions/checkout@v4 | |
| - name: Install docker | |
| uses: docker/setup-buildx-action@v1 | |
| id: buildx | |
| with: | |
| install: true | |
| - name: Install ruby version ${{ env.ruby_version }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ env.ruby_version }} | |
| bundler-cache: true | |
| - name: Run task acceptance tests | |
| run: | | |
| cd task_spec | |
| bundle exec rake task_acceptance |