Skip to content

Commit fd56428

Browse files
authored
Merge pull request #183 from tailscale/mpminardi/granular-scope-testing
.github/workflows: add tests for new / granular minimal OAuth scopes
2 parents 84a3f23 + c66619a commit fd56428

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

.github/workflows/tailscale.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,36 @@ jobs:
1616
os: [ubuntu-latest, windows-latest, macos-latest, windows-11-arm]
1717
cache: ['false', 'true']
1818
runs-on: ${{ matrix.os }}
19+
steps:
20+
- name: Check out code
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
23+
- name: Tailscale Action
24+
uses: ./
25+
with:
26+
oauth-client-id: ${{ secrets.TS_OAUTH_GRANULAR_CLIENT_ID }}
27+
oauth-secret: ${{ secrets.TS_OAUTH_GRANULAR_SECRET }}
28+
tags: tag:ci
29+
use-cache: ${{ matrix.cache }}
30+
31+
- name: check for tailscale connection
32+
shell: bash
33+
run:
34+
tailscale status -json | jq -r .BackendState | grep -q Running
35+
36+
- name: ensure no dirty files from Tailscale Action remain
37+
shell: bash
38+
run: |
39+
extra_files=$(git ls-files . --exclude-standard --others)
40+
if [ ! -z "$extra_files" ]; then
41+
echo "::error::Unexpected extra files: $extra_files"
42+
exit 1
43+
fi
44+
45+
# This job runs as a sanity check to ensure we have not broken the ability for OAuth clients using
46+
# our legacy scopes to successfully connect to tailnets using this action.
47+
legacyScopesCheck:
48+
runs-on: ubuntu-latest
1949
steps:
2050
- name: Check out code
2151
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -41,4 +71,3 @@ jobs:
4171
echo "::error::Unexpected extra files: $extra_files"
4272
exit 1
4373
fi
44-

0 commit comments

Comments
 (0)