From 5892512cb0c51d28a5461bb25f8b1028c19b63d2 Mon Sep 17 00:00:00 2001 From: michaelvlach Date: Sun, 18 Jun 2023 15:31:50 +0200 Subject: [PATCH 1/9] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b2044b137..f71544932 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Agnesoft Graph Database -![Crates.io](https://img.shields.io/crates/v/agdb)[![release](https://github.com/agnesoft/agdb/actions/workflows/build.yaml/badge.svg)](https://github.com/agnesoft/agdb/actions/workflows/release.yaml) [![coverage](https://github.com/agnesoft/agdb/actions/workflows/coverage.yaml/badge.svg)](https://github.com/agnesoft/agdb/actions/workflows/coverage.yaml) [![codecov](https://codecov.io/gh/agnesoft/agdb/branch/main/graph/badge.svg?token=Z6YO8C3XGU)](https://codecov.io/gh/agnesoft/agdb) +![Crates.io](https://img.shields.io/crates/v/agdb) [![release](https://github.com/agnesoft/agdb/actions/workflows/release.yaml/badge.svg)](https://github.com/agnesoft/agdb/actions/workflows/release.yaml) [![coverage](https://github.com/agnesoft/agdb/actions/workflows/coverage.yaml/badge.svg)](https://github.com/agnesoft/agdb/actions/workflows/coverage.yaml) [![codecov](https://codecov.io/gh/agnesoft/agdb/branch/main/graph/badge.svg?token=Z6YO8C3XGU)](https://codecov.io/gh/agnesoft/agdb) The Agnesoft Graph Database (aka _agdb_) is persistent memory mapped graph database using purely 'no-text' programmatic queries. It can be used as a main persistent storage as well as fast in-memory cache. Its typed but schema-less data store allows for seamless data updates with no downtime or costly migrations. All queries are constructed via a builder pattern (or directly as objects) with no special language or text parsing. From f5331453074a2e6454a21985253f688dc759150c Mon Sep 17 00:00:00 2001 From: michaelvlach Date: Sun, 18 Jun 2023 15:33:25 +0200 Subject: [PATCH 2/9] add test workflow --- .github/workflows/release-test.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/release-test.yaml diff --git a/.github/workflows/release-test.yaml b/.github/workflows/release-test.yaml new file mode 100644 index 000000000..940c0882e --- /dev/null +++ b/.github/workflows/release-test.yaml @@ -0,0 +1,23 @@ +name: release-test + +on: + pull_request: + branches: ["main"] + +env: + CARGO_TERM_COLOR: always + +jobs: + new_version: + runs-on: ubuntu-latest + outputs: + new_version: ${{ steps.new_version.outputs.new_version }} + steps: + - uses: actions/checkout@v3 + - run: | + cargo search ^agdb --limit 1 -q + cargo search agdb --limit 1 -q + cargo search flagdb --limit 1 -q + PUBLISHED_VERSION=$(cargo search ^agdb --limit 1 -q | head -n 1 | cut -d '"' -f 2) + CURRENT_VERSION=$(cat Cargo.toml | grep version | head -n 1 | cut -d '"' -f 2) + if [[ "${PUBLISHED_VERSION}" != "${CURRENT_VERSION}" ]]; then echo "new_version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT"; fi From 79e3b8a2f30d9ff236f91512779adfc9723f7978 Mon Sep 17 00:00:00 2001 From: michaelvlach Date: Sun, 18 Jun 2023 15:36:33 +0200 Subject: [PATCH 3/9] fix syntax --- .github/workflows/release-test.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-test.yaml b/.github/workflows/release-test.yaml index 940c0882e..e0a5bd9e6 100644 --- a/.github/workflows/release-test.yaml +++ b/.github/workflows/release-test.yaml @@ -15,9 +15,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: | - cargo search ^agdb --limit 1 -q - cargo search agdb --limit 1 -q - cargo search flagdb --limit 1 -q PUBLISHED_VERSION=$(cargo search ^agdb --limit 1 -q | head -n 1 | cut -d '"' -f 2) CURRENT_VERSION=$(cat Cargo.toml | grep version | head -n 1 | cut -d '"' -f 2) - if [[ "${PUBLISHED_VERSION}" != "${CURRENT_VERSION}" ]]; then echo "new_version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT"; fi + if [[ "${PUBLISHED_VERSION}" != "${CURRENT_VERSION}" ]]; then echo "new_version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT; fi + echo $CURRENT_VERSION From d85b0bf2d45ec658da7e49df79922d3d38a314cd Mon Sep 17 00:00:00 2001 From: michaelvlach Date: Sun, 18 Jun 2023 15:38:27 +0200 Subject: [PATCH 4/9] print for debug --- .github/workflows/release-test.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-test.yaml b/.github/workflows/release-test.yaml index e0a5bd9e6..816f6b409 100644 --- a/.github/workflows/release-test.yaml +++ b/.github/workflows/release-test.yaml @@ -15,7 +15,9 @@ jobs: steps: - uses: actions/checkout@v3 - run: | - PUBLISHED_VERSION=$(cargo search ^agdb --limit 1 -q | head -n 1 | cut -d '"' -f 2) + PUBLISHED_VERSION=$(cargo search ^flagdb$ --limit 1 -q | head -n 1 | cut -d '"' -f 2) + echo $PUBLISHED_VERSION CURRENT_VERSION=$(cat Cargo.toml | grep version | head -n 1 | cut -d '"' -f 2) + echo $CURRENT_VERSION if [[ "${PUBLISHED_VERSION}" != "${CURRENT_VERSION}" ]]; then echo "new_version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT; fi echo $CURRENT_VERSION From dc3aa5db49b5bae1dc3c39f1616503b1a4e4d6a3 Mon Sep 17 00:00:00 2001 From: michaelvlach Date: Sun, 18 Jun 2023 15:39:52 +0200 Subject: [PATCH 5/9] pass to next step --- .github/workflows/release-test.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-test.yaml b/.github/workflows/release-test.yaml index 816f6b409..1b817b4db 100644 --- a/.github/workflows/release-test.yaml +++ b/.github/workflows/release-test.yaml @@ -15,9 +15,12 @@ jobs: steps: - uses: actions/checkout@v3 - run: | - PUBLISHED_VERSION=$(cargo search ^flagdb$ --limit 1 -q | head -n 1 | cut -d '"' -f 2) - echo $PUBLISHED_VERSION + PUBLISHED_VERSION=$(cargo search ^agdb$ --limit 1 -q | head -n 1 | cut -d '"' -f 2) CURRENT_VERSION=$(cat Cargo.toml | grep version | head -n 1 | cut -d '"' -f 2) - echo $CURRENT_VERSION if [[ "${PUBLISHED_VERSION}" != "${CURRENT_VERSION}" ]]; then echo "new_version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT; fi - echo $CURRENT_VERSION + + print_version: + runs-on: ubuntu-latest + needs: [new_version] + steps: + - run: echo ${{ needs.new_version.outputs.new_version }} From 1a3f86d3e5ce4ad7e5277ab1b145a4c8238fac9c Mon Sep 17 00:00:00 2001 From: michaelvlach Date: Sun, 18 Jun 2023 15:45:25 +0200 Subject: [PATCH 6/9] fix output passing --- .github/workflows/release-test.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-test.yaml b/.github/workflows/release-test.yaml index 1b817b4db..9fc426dc6 100644 --- a/.github/workflows/release-test.yaml +++ b/.github/workflows/release-test.yaml @@ -17,10 +17,14 @@ jobs: - run: | PUBLISHED_VERSION=$(cargo search ^agdb$ --limit 1 -q | head -n 1 | cut -d '"' -f 2) CURRENT_VERSION=$(cat Cargo.toml | grep version | head -n 1 | cut -d '"' -f 2) + echo $CURRENT_VERSION if [[ "${PUBLISHED_VERSION}" != "${CURRENT_VERSION}" ]]; then echo "new_version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT; fi + echo $GITHUB_OUTPUT print_version: runs-on: ubuntu-latest needs: [new_version] steps: - - run: echo ${{ needs.new_version.outputs.new_version }} + - run: echo $CURRENT_VERSION + env: + CURRENT_VERSION: ${{ needs.new_version.outputs.new_version }} From 47b457ddd172a533bc777cc1be58e4f6452744bb Mon Sep 17 00:00:00 2001 From: michaelvlach Date: Sun, 18 Jun 2023 15:47:32 +0200 Subject: [PATCH 7/9] cat file --- .github/workflows/release-test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-test.yaml b/.github/workflows/release-test.yaml index 9fc426dc6..45f80fc01 100644 --- a/.github/workflows/release-test.yaml +++ b/.github/workflows/release-test.yaml @@ -20,6 +20,7 @@ jobs: echo $CURRENT_VERSION if [[ "${PUBLISHED_VERSION}" != "${CURRENT_VERSION}" ]]; then echo "new_version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT; fi echo $GITHUB_OUTPUT + cat "$GITHUB_OUTPUT" print_version: runs-on: ubuntu-latest From 15c84c69f36c5e690fae47568363d8239b936f36 Mon Sep 17 00:00:00 2001 From: michaelvlach Date: Sun, 18 Jun 2023 15:49:26 +0200 Subject: [PATCH 8/9] fix missing id in step --- .github/workflows/release-test.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-test.yaml b/.github/workflows/release-test.yaml index 45f80fc01..23735d2c4 100644 --- a/.github/workflows/release-test.yaml +++ b/.github/workflows/release-test.yaml @@ -14,13 +14,13 @@ jobs: new_version: ${{ steps.new_version.outputs.new_version }} steps: - uses: actions/checkout@v3 - - run: | + - id: new_version + run: | PUBLISHED_VERSION=$(cargo search ^agdb$ --limit 1 -q | head -n 1 | cut -d '"' -f 2) CURRENT_VERSION=$(cat Cargo.toml | grep version | head -n 1 | cut -d '"' -f 2) - echo $CURRENT_VERSION if [[ "${PUBLISHED_VERSION}" != "${CURRENT_VERSION}" ]]; then echo "new_version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT; fi - echo $GITHUB_OUTPUT - cat "$GITHUB_OUTPUT" + echo "Published version: ${PUBLISHED_VERSION}" + echo "Current version: ${CURRENT_VERSION}" print_version: runs-on: ubuntu-latest From 786d8886e2ad8117b66929a01ad8a9f49511c9ed Mon Sep 17 00:00:00 2001 From: michaelvlach Date: Sun, 18 Jun 2023 15:51:03 +0200 Subject: [PATCH 9/9] fix release workflow --- .github/workflows/release-test.yaml | 31 ----------------------------- .github/workflows/release.yaml | 9 ++++++--- 2 files changed, 6 insertions(+), 34 deletions(-) delete mode 100644 .github/workflows/release-test.yaml diff --git a/.github/workflows/release-test.yaml b/.github/workflows/release-test.yaml deleted file mode 100644 index 23735d2c4..000000000 --- a/.github/workflows/release-test.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: release-test - -on: - pull_request: - branches: ["main"] - -env: - CARGO_TERM_COLOR: always - -jobs: - new_version: - runs-on: ubuntu-latest - outputs: - new_version: ${{ steps.new_version.outputs.new_version }} - steps: - - uses: actions/checkout@v3 - - id: new_version - run: | - PUBLISHED_VERSION=$(cargo search ^agdb$ --limit 1 -q | head -n 1 | cut -d '"' -f 2) - CURRENT_VERSION=$(cat Cargo.toml | grep version | head -n 1 | cut -d '"' -f 2) - if [[ "${PUBLISHED_VERSION}" != "${CURRENT_VERSION}" ]]; then echo "new_version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT; fi - echo "Published version: ${PUBLISHED_VERSION}" - echo "Current version: ${CURRENT_VERSION}" - - print_version: - runs-on: ubuntu-latest - needs: [new_version] - steps: - - run: echo $CURRENT_VERSION - env: - CURRENT_VERSION: ${{ needs.new_version.outputs.new_version }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 556d067f3..55db7d587 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,10 +20,13 @@ jobs: new_version: ${{ steps.new_version.outputs.new_version }} steps: - uses: actions/checkout@v3 - - run: | - PUBLISHED_VERSION=$(cargo search agdb --limit 1 -q | head -n 1 | cut -d '"' -f 2) + - id: new_version + run: | + PUBLISHED_VERSION=$(cargo search ^agdb$ --limit 1 -q | head -n 1 | cut -d '"' -f 2) CURRENT_VERSION=$(cat Cargo.toml | grep version | head -n 1 | cut -d '"' -f 2) - if [[ "${PUBLISHED_VERSION}" != "${CURRENT_VERSION}" ]]; then echo "new_version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT"; fi + if [[ "${PUBLISHED_VERSION}" != "${CURRENT_VERSION}" ]]; then echo "new_version=${CURRENT_VERSION}" >> $GITHUB_OUTPUT; fi + echo "Published version: ${PUBLISHED_VERSION}" + echo "Current version: ${CURRENT_VERSION}" release: runs-on: ubuntu-latest