From 70778db42ee65da864d5c8f07dac7c61b852a69d Mon Sep 17 00:00:00 2001 From: Anatolios Laskaris Date: Tue, 4 Apr 2023 19:20:55 +0300 Subject: [PATCH] chore: E2E updates [fixes FLU-297, FLU-298, FLU-267] (#16) --- .github/workflows/e2e.yml | 63 +++++++++++++++------ .github/workflows/{ci.yml => run-tests.yml} | 13 ++++- .github/workflows/tests.yml | 5 +- README.md | 2 +- 4 files changed, 59 insertions(+), 24 deletions(-) rename .github/workflows/{ci.yml => run-tests.yml} (50%) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 79caf9e..25aff77 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -4,9 +4,22 @@ on: pull_request: paths-ignore: - "**.md" + - ".github/**" + - "!.github/workflows/e2e.yml" + - "!.github/workflows/snapshot.yml" + types: + - "labeled" + - "synchronize" + - "opened" + - "reopened" push: branches: - "master" + paths-ignore: + - "**.md" + - ".github/**" + - "!.github/workflows/e2e.yml" + - "!.github/workflows/snapshot.yml" concurrency: group: "${{ github.workflow }}-${{ github.ref }}" @@ -14,25 +27,14 @@ concurrency: jobs: snapshot: + if: > + github.event_name == 'push' || + contains(github.event.pull_request.labels.*.name, 'e2e') name: "sqlite-wasm" uses: ./.github/workflows/snapshot.yml with: ref: ${{ github.ref }} - registry: - needs: - - snapshot - uses: fluencelabs/registry/.github/workflows/tests.yml@main - with: - cargo-dependencies: | - [ - { - "package": "marine-sqlite-connector", - "version": "=${{ needs.snapshot.outputs.version }}", - "registry": "fluence" - } - ] - spell: needs: - snapshot @@ -51,9 +53,8 @@ jobs: needs: - spell - uses: fluencelabs/rust-peer/.github/workflows/snapshot.yml@master + uses: fluencelabs/rust-peer/.github/workflows/build.yml@master with: - image-name: "docker.fluence.dev/sqlite-wasm-connector" cargo-dependencies: | [ { @@ -68,10 +69,36 @@ jobs: } ] + rust-peer-snapshot: + needs: + - rust-peer + + uses: fluencelabs/rust-peer/.github/workflows/container.yml@master + with: + image-name: "docker.fluence.dev/sqlite-wasm-connector" + flavour: "minimal" + rust-peer-sha: "${{ needs.rust-peer.outputs.rust-peer-sha }}" + spell-aqua-tests: name: "spell" needs: - - rust-peer + - rust-peer-snapshot uses: fluencelabs/spell/.github/workflows/tests.yml@main with: - rust-peer-image: "${{ needs.rust-peer.outputs.rust-peer-image }}" + rust-peer-image: "${{ needs.rust-peer-snapshot.outputs.rust-peer-image }}" + + registry: + needs: + - rust-peer-snapshot + - snapshot + uses: fluencelabs/registry/.github/workflows/tests.yml@main + with: + rust-peer-image: "${{ needs.rust-peer-snapshot.outputs.rust-peer-image }}" + cargo-dependencies: | + [ + { + "package": "marine-sqlite-connector", + "version": "=${{ needs.snapshot.outputs.version }}", + "registry": "fluence" + } + ] diff --git a/.github/workflows/ci.yml b/.github/workflows/run-tests.yml similarity index 50% rename from .github/workflows/ci.yml rename to .github/workflows/run-tests.yml index d50a3d2..3870144 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/run-tests.yml @@ -1,20 +1,27 @@ -name: "ci" +name: "test" on: pull_request: paths-ignore: - "**.md" + - ".github/**" + - "!.github/workflows/run-tests.yml" + - "!.github/workflows/tests.yml" push: branches: - "master" + paths-ignore: + - "**.md" + - ".github/**" + - "!.github/workflows/run-tests.yml" + - "!.github/workflows/tests.yml" concurrency: group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: - tests: - name: "Run tests" + sqlite-wasm: uses: ./.github/workflows/tests.yml with: ref: ${{ github.ref }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 692c472..050236f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,5 @@ -name: Run tests +name: Run tests with workflow call + on: workflow_call: inputs: @@ -10,7 +11,7 @@ on: jobs: tests: name: "cargo test" - runs-on: ubuntu-latest + runs-on: builder timeout-minutes: 60 steps: diff --git a/README.md b/README.md index 7a4d7f4..17742ed 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SQLite [![Package][package-img]][package-url] [![Documentation][documentation-img]][documentation-url] [![Build][build-img]][build-url] +# SQLite [![Package][package-img]][package-url] [![Documentation][documentation-img]][documentation-url] The package provides an interface to [SQLite][1].