chore: Update e2e (#691)

* Update e2e

* Fix
This commit is contained in:
Anatolios Laskaris 2023-04-05 15:28:51 +03:00 committed by GitHub
parent 2394a9b875
commit 70298479ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 92 additions and 61 deletions

View File

@ -4,38 +4,32 @@ on:
pull_request:
paths-ignore:
- "**.md"
- ".github/**"
- "!.github/workflows/e2e.yml"
- "!.github/workflows/snapshot.yml"
types:
- "labeled"
- "synchronize"
- "opened"
- "reopened"
push:
branches:
- "main"
paths-ignore:
- "**.md"
- ".github/**"
- "!.github/workflows/e2e.yml"
- "!.github/workflows/snapshot.yml"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
tests:
name: "Run sbt tests"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: fluencelabs/aqua
- name: Cache Scala
uses: coursier/cache-action@v6
- name: Setup Scala
uses: coursier/setup-action@v1
with:
apps: sbt
- name: Run tests
run: sbt test
aqua:
name: "aqua"
if: >
github.event_name == 'push' ||
contains(github.event.pull_request.labels.*.name, 'e2e')
uses: ./.github/workflows/snapshot.yml
with:
ref: ${{ github.ref }}
@ -58,27 +52,20 @@ jobs:
with:
aqua-version: "${{ needs.aqua.outputs.aqua-version }}"
status:
runs-on: ubuntu-latest
if: always()
aqua-native:
name: "aqua"
strategy:
matrix:
runner:
- runs-on: ubuntu-latest
arch: amd64
os: linux
static: true
needs:
- fluence-cli
- registry
- aqua-playground
steps:
- uses: lwhiteley/dependent-jobs-result-check@v1
id: status
with:
statuses: failure,cancelled,skipped
dependencies: ${{ toJSON(needs) }}
- name: Log output
run: |
echo "statuses:" "${{ steps.status.outputs.statuses }}"
echo "jobs:" "${{ steps.status.outputs.jobs }}"
echo "found any?:" "${{ steps.status.outputs.found }}"
- name: Fail run
if: fromJSON(steps.status.outputs.found)
run: exit 1
- aqua
uses: ./.github/workflows/binary.yml
with:
runs-on: ${{ matrix.runner.runs-on }}
arch: ${{ matrix.runner.arch }}
os: ${{ matrix.runner.os }}
static: ${{ matrix.runner.static }}

28
.github/workflows/run-tests.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: "test"
on:
pull_request:
paths-ignore:
- "**.md"
- ".github/**"
- "!.github/workflows/tests.yml"
- "!.github/workflows/run-tests.yml"
push:
branches:
- "master"
paths-ignore:
- "**.md"
- ".github/**"
- "!.github/workflows/tests.yml"
- "!.github/workflows/run-tests.yml"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
tests:
name: "aqua"
uses: ./.github/workflows/tests.yml
with:
ref: ${{ github.ref }}

View File

@ -284,19 +284,3 @@ jobs:
with:
working-directory: language-server/language-server-npm
id: ${{ steps.version.outputs.id }}
aqua-native:
strategy:
matrix:
runner:
- runs-on: ubuntu-latest
arch: amd64
os: linux
static: true
needs:
- compile
uses: ./.github/workflows/binary.yml
with:
runs-on: ${{ matrix.runner.runs-on }}
arch: ${{ matrix.runner.arch }}
os: ${{ matrix.runner.os }}
static: ${{ matrix.runner.static }}

32
.github/workflows/tests.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Run tests with workflow_call
on:
workflow_call:
inputs:
ref:
description: "git ref to checkout to"
type: string
default: "main"
jobs:
tests:
name: "Run sbt tests"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: fluencelabs/aqua
ref: ${{ inputs.ref }}
- name: Cache Scala
uses: coursier/cache-action@v6
- name: Setup Scala
uses: coursier/setup-action@v1
with:
apps: sbt
- name: Run tests
run: sbt test