From 827617bf571d65eeec6a4f5f9c63228e42b7a988 Mon Sep 17 00:00:00 2001 From: Mark Phelps Date: Sun, 24 May 2020 14:55:11 -0400 Subject: [PATCH] Try to get qawolf to run in ITs --- .github/workflows/integration-test.yml | 49 +++++++++++++-- .github/workflows/qawolf.yml | 82 -------------------------- 2 files changed, 45 insertions(+), 86 deletions(-) delete mode 100644 .github/workflows/qawolf.yml diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 048e3db4bf..ca43e700d2 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -11,25 +11,39 @@ on: - master jobs: - ## Integration Tests test: name: Test runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + + - name: Install dependencies + run: | + sudo apt update + # chromium dependencies + sudo apt-get install -y libgbm1 + # webkit dependencies + sudo apt-get install -y libwoff1 libopus0 libwebp6 libwebpdemux2 libenchant1c2a libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libgles2 libevent-2.1-6 libnotify4 libvpx5 libxslt1.1 + # ffmpeg + sudo apt-get install -y ffmpeg + - name: Setup Go uses: actions/setup-go@v1 with: go-version: 1.14.1 id: go + - name: Setup node + uses: actions/setup-node@v1 + - name: Checkout uses: actions/checkout@v2 - - name: Restore Cache - uses: actions/cache@v1 - id: cache + - uses: actions/cache@v1 + id: go-cache with: path: ~/go/pkg/mod key: ${{ runner.os }}-${{ hashFiles('**/go.sum') }} @@ -46,3 +60,30 @@ jobs: uses: ./.github/actions/api-test with: args: ./script/test/cli + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v1 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + + - run: yarn + working-directory: ./ui + + - name: Test qawolf + run: yarn qawolf test --headless + env: + FFMPEG_PATH: /usr/bin/ffmpeg # for recording video + QAW_ARTIFACT_PATH: ${{ github.workspace }}/artifacts + working-directory: ./ui + + - name: Upload Artifacts + if: always() + uses: actions/upload-artifact@master + with: + name: qawolf + path: ${{ github.workspace }}/artifacts \ No newline at end of file diff --git a/.github/workflows/qawolf.yml b/.github/workflows/qawolf.yml deleted file mode 100644 index 75f48f01d3..0000000000 --- a/.github/workflows/qawolf.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: qawolf -on: - pull_request: - branches: - - master - paths-ignore: - - '*.md' - - '.all-contributorsrc' - -jobs: - test: - runs-on: ubuntu-18.04 - - timeout-minutes: 20 - - env: - working-directory: ./ui - - steps: - - name: Install dependencies - run: | - sudo apt update - # chromium dependencies - sudo apt-get install libgbm1 - # webkit dependencies - sudo apt-get install libwoff1 libopus0 libwebp6 libwebpdemux2 libenchant1c2a libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libgles2 libevent-2.1-6 libnotify4 libvpx5 libxslt1.1 - # ffmpeg - sudo apt-get install -y ffmpeg - - - uses: actions/checkout@v2 - - - uses: actions/setup-go@v1 - with: - go-version: 1.14.1 - id: go - - - uses: actions/cache@v1 - id: go-cache - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-${{ hashFiles('**/go.sum') }} - - - name: Build binary - run: go build -o ./bin/flipt ./cmd/flipt/. - - - name: Run pending migrations - run: ./bin/flipt migrate --config ./config/local.yml &> /dev/null - - - name: Start Flipt - run: ./bin/flipt --config ./config/local.yml &> /dev/null & - - - uses: actions/setup-node@v1 - - - run: npx wait-on http://0.0.0.0:8080 - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v1 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - run: yarn - working-directory: ${{env.working-directory}} - - - run: yarn qawolf test --headless - env: - FFMPEG_PATH: /usr/bin/ffmpeg # for recording video - QAW_ARTIFACT_PATH: ${{ github.workspace }}/artifacts - working-directory: ${{env.working-directory}} - - - name: Upload Artifacts - if: always() - uses: actions/upload-artifact@master - with: - name: qawolf - path: ${{ github.workspace }}/artifacts \ No newline at end of file