From cf0f7320ce4525c7625ec1dcc72a48b6f7323e59 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Fri, 9 Feb 2024 17:52:24 -0800 Subject: [PATCH] Add basic smoke test to provide test coverage for other distros --- .github/workflows/distro-smoke-test.yml | 59 +++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/distro-smoke-test.yml diff --git a/.github/workflows/distro-smoke-test.yml b/.github/workflows/distro-smoke-test.yml new file mode 100644 index 00000000..97a8dfcf --- /dev/null +++ b/.github/workflows/distro-smoke-test.yml @@ -0,0 +1,59 @@ +name: Smoke Test + +on: + workflow_dispatch: + pull_request: + schedule: + - cron: '0 0 * * *' + push: + branches: [ master ] + +jobs: + test: + strategy: + matrix: + distro: [ubuntu:latest, fedora:latest, debian:latest] + fail-fast: false + runs-on: ubuntu-latest + container: ${{ matrix.distro }} + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.21 + - name: Debian-based Setup + if: ${{ matrix.distro == 'ubuntu:latest' || matrix.distro == 'debian:latest' }} + run: | + + # Install our dependencies + sudo apt-get update + sudo apt-get install -y zsh tmux fish + + # Work around a weird bug where zsh on ubuntu actions gives that directory 0777 which makes zsh refuse to start + sudo chmod 0755 -R /usr/share/zsh/ + + # Set a consistent hostname so we can run tests that depend on it + sudo hostname ghaction-runner-hostname + - name: Fedora-based Setup + if: ${{ matrix.distro == 'fedora:latest' }} + run: | + + # Install our dependencies + sudo dnf update + sudo dnf install -y zsh tmux fish + + # Set a consistent hostname so we can run tests that depend on it + sudo hostname ghaction-runner-hostname + - name: Go test + env: + DD_API_KEY: ${{ secrets.DD_API_KEY }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + run: | + go install gotest.tools/gotestsum@bc98120 + make ftest FILTER=TestInstallViaPythonScriptFromHead + # - name: Setup tmate session + # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 + # with: + # limit-access-to-actor: true \ No newline at end of file