Skip to content

Add go-expect based integration test for password resets #526

Add go-expect based integration test for password resets

Add go-expect based integration test for password resets #526

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- main
schedule:
- cron: '0 8 * * *'
workflow_dispatch: # still allow manual triggering
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: ./go.mod
check-latest: true
cache: true
- name: Install keyring dependencies
run: |
sudo apt-get update
sudo apt-get install -y gnome-keyring dbus-x11
- name: Start D-Bus and keyring
run: |
# Start D-Bus session
eval $(dbus-launch --sh-syntax)
echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> $GITHUB_ENV
# Initialize gnome-keyring with a test password
echo 'test' | gnome-keyring-daemon --unlock
eval $(echo 'test' | gnome-keyring-daemon --start --components=secrets)
echo "GNOME_KEYRING_CONTROL=$GNOME_KEYRING_CONTROL" >> $GITHUB_ENV
- name: ShellCheck
run: shellcheck scripts/install.sh
- name: Mod
run: go mod tidy --diff
- name: Build
run: go build ./...
- name: Vet
run: go vet ./...
- name: Test
env:
TIGER_PUBLIC_KEY_INTEGRATION: ${{ secrets.TIGER_PUBLIC_KEY_INTEGRATION }}
TIGER_SECRET_KEY_INTEGRATION: ${{ secrets.TIGER_SECRET_KEY_INTEGRATION }}
run: go test -race -coverprofile=coverage.out -coverpkg=./... ./...
- name: Generate coverage report
run: go tool cover -html=coverage.out -o=coverage.html
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage.html
path: coverage.html