From 2066a6ca66ae3a55c05013cd39ad60c5d6ffddc3 Mon Sep 17 00:00:00 2001 From: Aksel Thomsen Date: Fri, 29 Nov 2024 15:17:55 +0100 Subject: [PATCH 01/19] Update DESCRIPTION Signed-off-by: Aksel Thomsen --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index cf65929..d206704 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -10,7 +10,7 @@ Description: The connector package helps connecting R to databases that contains ADAM, STDM and so on. The package defines an interface that can be reuse for any databases. License: Apache License (>= 2) -URL: https://jubilant-adventure-yr95p3g.pages.github.io/ +URL: https://novonordisk-opensource.github.io/connector, https://github.com/novonordisk-opensource/connector Imports: arrow, checkmate, @@ -49,4 +49,4 @@ Roxygen: list(markdown = TRUE, r6 = TRUE) RoxygenNote: 7.3.2 Remotes: NovoNordisk-OpenSource/zephyr, - NN-OpenSource/connector.logger + NovoNordisk-OpenSource/connector.logger From a8521a5be0b70e4a1c270d5100834762bb4bc6bf Mon Sep 17 00:00:00 2001 From: Aksel Thomsen Date: Fri, 29 Nov 2024 15:18:19 +0100 Subject: [PATCH 02/19] Update NEWS.md Signed-off-by: Aksel Thomsen --- NEWS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index bd44292..5b29b28 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,6 @@ * Added `connectors` super class -# NNaccess 0.0.1 +# connector 0.0.1 -* Initial release to internal package manager +* Initial version From 50b825bee50c899a727f6dde4151a584b8e26076 Mon Sep 17 00:00:00 2001 From: Aksel Thomsen Date: Fri, 29 Nov 2024 15:19:23 +0100 Subject: [PATCH 03/19] Update _pkgdown.yml Signed-off-by: Aksel Thomsen --- _pkgdown.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pkgdown.yml b/_pkgdown.yml index 1b23ce2..e643646 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,4 +1,4 @@ -url: https://fantastic-adventure-gqozn9k.pages.github.io/ +url: https://novonordisk-opensource.github.io/connector template: bootstrap: 5 reference: From d582a6348209be4d4181a3e8d97da0fe72b21265 Mon Sep 17 00:00:00 2001 From: Aksel Thomsen Date: Fri, 29 Nov 2024 16:15:34 +0100 Subject: [PATCH 04/19] Create action.yaml Signed-off-by: Aksel Thomsen --- .github/actions/setup/action.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/actions/setup/action.yaml diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml new file mode 100644 index 0000000..a879f2d --- /dev/null +++ b/.github/actions/setup/action.yaml @@ -0,0 +1,10 @@ +name: Specific setup for connector +description: Starts a postgres database for unit tests +runs: + using: "composite" + steps: + - name: Start local postgres server with Docker + if: runner.os == 'Linux' + run: | + docker pull postgres + docker run --name my-postgres --env POSTGRES_PASSWORD=${{env.POSTGRES_PW}} --publish 5432:5432 From b56f0484616b9a75cb24638d313b0801e708deaa Mon Sep 17 00:00:00 2001 From: Aksel Thomsen Date: Fri, 29 Nov 2024 16:19:04 +0100 Subject: [PATCH 05/19] Add files via upload Signed-off-by: Aksel Thomsen --- .github/workflows/check_and_co.yaml | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/check_and_co.yaml diff --git a/.github/workflows/check_and_co.yaml b/.github/workflows/check_and_co.yaml new file mode 100644 index 0000000..1fbdfdf --- /dev/null +++ b/.github/workflows/check_and_co.yaml @@ -0,0 +1,36 @@ +on: + push: + branches: + - main + - master + pull_request: + branches: + - main + - master +name: All actions +jobs: + check-current-version: + name: Check current version + uses: >- + NovoNordisk-OpenSource/r.workflows/.github/workflows/check_current_version.yaml@main + with: + use_local_setup_action: true + check-nn-version: + name: Check NN version + uses: >- + NovoNordisk-OpenSource/r.workflows/.github/workflows/check_nn_versions.yaml@main + with: + use_local_setup_action: true + pkgdown: + name: Pkgdown site + uses: NovoNordisk-OpenSource/r.workflows/.github/workflows/pkgdown.yaml@main + with: + use_local_setup_action: true + coverage: + name: Coverage report + uses: NovoNordisk-OpenSource/r.workflows/.github/workflows/coverage.yaml@main + with: + use_local_setup_action: true + megalinter: + name: Megalinter + uses: NovoNordisk-OpenSource/r.workflows/.github/workflows/megalinter.yaml@main From 0d61b43698f8ac374b9d2589b73022c58f53685a Mon Sep 17 00:00:00 2001 From: Aksel Thomsen Date: Fri, 29 Nov 2024 16:19:28 +0100 Subject: [PATCH 06/19] Delete .github/workflows/R-CMD-check-versions.yaml Signed-off-by: Aksel Thomsen --- .github/workflows/R-CMD-check-versions.yaml | 85 --------------------- 1 file changed, 85 deletions(-) delete mode 100644 .github/workflows/R-CMD-check-versions.yaml diff --git a/.github/workflows/R-CMD-check-versions.yaml b/.github/workflows/R-CMD-check-versions.yaml deleted file mode 100644 index 4f4f50b..0000000 --- a/.github/workflows/R-CMD-check-versions.yaml +++ /dev/null @@ -1,85 +0,0 @@ ---- -on: - push: - branches: - - main - - master - pull_request: - branches: - - main - - master -permissions: read-all - -name: R-CMD-check-versions - -jobs: - R-CMD-check: - runs-on: ${{ matrix.os }} - name: ${{ matrix.os }} (R ${{ matrix.config.r }}, ${{ matrix.config.date }}) - strategy: - fail-fast: false - matrix: - os: - - macos-latest - - windows-latest - - ubuntu-latest - config: - - date: 2023-10-25 # 08mar2024: Next release date for SCE-R - r: 4.3.1 - env: - R_KEEP_PKG_SOURCE: yes - POSTGRES_PW: ${{secrets.TEST_POSTGRES_DB_PW}} - GITHUB_PAT: ${{ secrets.ACTION_PAT || secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - use-public-rspm: false - - - name: Install curl - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt install libcurl4-openssl-dev - - - name: Install dependencies - run: | - options( - repos = c(CRAN = "https://packagemanager.posit.co/cran/${{ matrix.config.date }}") - ) - - - install.packages(c("attachment", "rcmdcheck", "pak"), Ncpus = parallel::detectCores()-1) - - pak::pak_update() - - - attachment::att_from_description(field = c("Depends", "Imports", "Suggests", "Remotes")) |> - pak::pkg_install() - - shell: Rscript {0} - - - name: Session info - run: | - sessionInfo() - installed.packages()[,c("Package", "Version")] - - shell: Rscript {0} - - - name: Start local postgres server with Docker - if: runner.os == 'Linux' - run: | - docker pull postgres - docker run --name my-postgres --env POSTGRES_PASSWORD=${{env.POSTGRES_PW}} --publish 5432:5432 --detach postgres - - - uses: r-lib/actions/check-r-package@v2 - with: - upload-snapshots: true - - - name: Stop and remove postgres server - if: runner.os == 'Linux' - run: | - docker stop my-postgres - docker remove my-postgres From bebb6fec0803438ff6361ec91b70c580869b9906 Mon Sep 17 00:00:00 2001 From: Aksel Thomsen Date: Fri, 29 Nov 2024 16:19:37 +0100 Subject: [PATCH 07/19] Delete .github/workflows/R-CMD-check.yaml Signed-off-by: Aksel Thomsen --- .github/workflows/R-CMD-check.yaml | 70 ------------------------------ 1 file changed, 70 deletions(-) delete mode 100644 .github/workflows/R-CMD-check.yaml diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml deleted file mode 100644 index 674068f..0000000 --- a/.github/workflows/R-CMD-check.yaml +++ /dev/null @@ -1,70 +0,0 @@ ---- -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help - -on: - push: - branches: - - main - - master - pull_request: - branches: - - main - - master -permissions: - contents: read -name: R-CMD-check -jobs: - R-CMD-check: - runs-on: ${{ matrix.config.os }} - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - strategy: - fail-fast: false - matrix: - config: - - os: macos-latest - r: release - - os: windows-latest - r: release - - os: ubuntu-latest - r: devel - http-user-agent: release - - os: ubuntu-latest - r: release - - os: ubuntu-latest - r: oldrel-1 - env: - R_KEEP_PKG_SOURCE: true - POSTGRES_PW: ${{secrets.TEST_POSTGRES_DB_PW}} - GITHUB_PAT: ${{ secrets.ACTION_PAT || secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{matrix.config.r}} - http-user-agent: ${{matrix.config.http-user-agent}} - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::rcmdcheck - needs: check - - - name: Start local postgres server with Docker - if: runner.os == 'Linux' - run: | - docker pull postgres - docker run --name my-postgres --env POSTGRES_PASSWORD=${{env.POSTGRES_PW}} --publish 5432:5432 --detach postgres - - - uses: r-lib/actions/check-r-package@v2 - with: - upload-snapshots: true - - - name: Stop and remove postgres server - if: runner.os == 'Linux' - run: | - docker stop my-postgres - docker remove my-postgres From fa7e82b0ba02d6163f9b4e0a47337bb940138bc5 Mon Sep 17 00:00:00 2001 From: Aksel Thomsen Date: Fri, 29 Nov 2024 16:19:48 +0100 Subject: [PATCH 08/19] Delete .github/workflows/mega-linter.yaml Signed-off-by: Aksel Thomsen --- .github/workflows/mega-linter.yaml | 91 ------------------------------ 1 file changed, 91 deletions(-) delete mode 100644 .github/workflows/mega-linter.yaml diff --git a/.github/workflows/mega-linter.yaml b/.github/workflows/mega-linter.yaml deleted file mode 100644 index 5084601..0000000 --- a/.github/workflows/mega-linter.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# MegaLinter GitHub Action configuration file -# More info at https://megalinter.io -# Modified from: https://megalinter.io/latest/install-github/ - -name: MegaLinter - -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - -permissions: - contents: write - issues: write - pull-requests: write - -env: - ADDITIONAL_EXCLUDED_DIRECTORIES: "dev" - APPLY_FIXES: all - APPLY_FIXES_EVENT: pull_request - APPLY_FIXES_MODE: pull_request - KICS_EXCLUDE_QUERIES: 555ab8f9-2001-455e-a077-f2d0f41e2fb9 # See queries: https://docs.kics.io/latest/queries/all-queries/ - SPELL_LYCHEE_FILE_EXTENSIONS: '*' # Check all file types for dead links - SPELL_LYCHEE_FILTER_REGEX_EXCLUDE: "R-CMD-check-versions.yaml" - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true - -jobs: - megalinter: - name: MegaLinter - runs-on: ubuntu-latest - - steps: - - name: Set up node.js 20 - uses: actions/setup-node@v3 - with: - node-version: '20' - - - name: Checkout Code - uses: actions/checkout@v3 - with: - token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} - fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances - - - name: MegaLinter - id: ml - uses: oxsecurity/megalinter@v7 - env: - VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Override with true if you always want to lint all sources - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Archive production artifacts - if: success() || failure() - uses: actions/upload-artifact@v4 - with: - name: MegaLinter reports - path: | - megalinter-reports - mega-linter.log - - - name: Create Pull Request with applied fixes - id: cpr - if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') - uses: peter-evans/create-pull-request@v6 - with: - token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} - commit-message: "[MegaLinter] Apply linters automatic fixes" - title: "[MegaLinter] Apply linters automatic fixes" - labels: bot - - - name: Create PR output - if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') - run: | - echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" - echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" - - - name: Prepare commit - if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') - run: sudo chown -Rc $UID .git/ - - - name: Commit and push applied linter fixes - if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') - uses: stefanzweifel/git-auto-commit-action@v4 - with: - branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }} - commit_message: "[MegaLinter] Apply linters fixes" - commit_user_name: megalinter-bot - commit_user_email: nicolas.vuillamy@ox.security From 1267898b33e2835a28839b51f09a482475bb2399 Mon Sep 17 00:00:00 2001 From: Aksel Thomsen Date: Fri, 29 Nov 2024 16:20:00 +0100 Subject: [PATCH 09/19] Delete .github/workflows/pkgdown.yaml Signed-off-by: Aksel Thomsen --- .github/workflows/pkgdown.yaml | 87 ---------------------------------- 1 file changed, 87 deletions(-) delete mode 100644 .github/workflows/pkgdown.yaml diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml deleted file mode 100644 index 7f0d157..0000000 --- a/.github/workflows/pkgdown.yaml +++ /dev/null @@ -1,87 +0,0 @@ -# Workflow adjusted from usethis::use_pkgdown_github_pages() to also publish pages from PRs in a subfolder - -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - release: - types: [published] - workflow_dispatch: - -permissions: - contents: write - pull-requests: write - -name: pkgdown - -jobs: - pkgdown: - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.ACTION_PAT || secrets.GITHUB_TOKEN }} - # Only restrict concurrency for non-PR jobs - concurrency: - group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} - steps: - - uses: actions/checkout@v4 - - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::pkgdown, local::. - needs: website - - - name: Build site - run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) - shell: Rscript {0} - - # If not pull request a brand new webpage is deployed - - - name: Deploy to GitHub pages 🚀 - if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.5.0 - with: - clean: false - branch: gh-pages - folder: docs - - # If pull request the webpage is deployed inside a dev/"PR number" folder for review - - - name: Add pkgdown PR Comment - uses: marocchino/sticky-pull-request-comment@v2 - if: github.event_name == 'pull_request' - with: - recreate: true - header: pkgdown - message: | - # Github pages - Review the pkgdown webpage for the PR [here](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/dev/${{ github.event.pull_request.number }}) - - - name: Copy page to temp folder - if: github.event_name == 'pull_request' - run: | - mkdir -p /home/runner/work/dev - cp -r ./docs/* /home/runner/work/dev - - - name: Check out gh-pages branch - if: github.event_name == 'pull_request' - uses: actions/checkout@v4 - with: - ref: gh-pages - - - name: Copy and push to gh-pages - if: github.event_name == 'pull_request' - run: | - mkdir -p dev/${{ github.event.pull_request.number }} - cp -r /home/runner/work/dev/* ./dev/${{ github.event.pull_request.number }} - git config --global user.email "actions-robot@novonordisk.com" - git config --global user.name "Actions Robot From Github Actions" - git add . - git commit -m "Update gh pages from the PR" - git push From 10e3c208abb04b7949424efc8e25a25e496ea0d6 Mon Sep 17 00:00:00 2001 From: Aksel Thomsen Date: Fri, 29 Nov 2024 16:20:08 +0100 Subject: [PATCH 10/19] Delete .github/workflows/test-coverage-internal.yaml Signed-off-by: Aksel Thomsen --- .github/workflows/test-coverage-internal.yaml | 84 ------------------- 1 file changed, 84 deletions(-) delete mode 100644 .github/workflows/test-coverage-internal.yaml diff --git a/.github/workflows/test-coverage-internal.yaml b/.github/workflows/test-coverage-internal.yaml deleted file mode 100644 index b003608..0000000 --- a/.github/workflows/test-coverage-internal.yaml +++ /dev/null @@ -1,84 +0,0 @@ ---- -# Workflow adjusted from usethis::use_github_action("test-coverage") to just report coverage internally and not to publish to codecov - -on: - push: - branches: - - main - - master - pull_request: - branches: - - main - - master -permissions: - contents: read - pull-requests: write -name: test-coverage-internal -jobs: - test-coverage-internal: - runs-on: ubuntu-latest - env: - POSTGRES_PW: ${{secrets.TEST_POSTGRES_DB_PW}} - GITHUB_PAT: ${{ secrets.ACTION_PAT || secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: | - any::covr - any::xml2 - any::dplyr - any::knitr - needs: coverage - - - name: Start local postgres server with Docker - run: | - docker pull postgres - docker run --name my-postgres --env POSTGRES_PASSWORD=${{env.POSTGRES_PW}} --publish 5432:5432 --detach postgres - - - name: Test coverage - run: | - covr::package_coverage() |> - covr::to_cobertura(filename = "cobertura.xml") - - xml <- xml2::read_xml("cobertura.xml") - - pkg_cov <- xml |> - xml2::xml_find_first("packages/package") |> - xml2::xml_attrs() |> - dplyr::bind_rows() - - fnc_cov <- xml |> - xml2::xml_find_first("packages/package") |> - xml2::xml_find_all("classes/class") |> - xml2::xml_attrs() |> - lapply(dplyr::bind_rows) - - res <- list(pkg_cov, fnc_cov) |> - dplyr::bind_rows() |> - dplyr::transmute( - Name = dplyr::coalesce(filename, name), - `Coverage (%)` = round(as.numeric(`line-rate`)*100, digits = 2) - ) |> - knitr::kable() - - c("# Code coverage", res) |> - writeLines(con = "coverage.md") - shell: Rscript {0} - - - name: Stop and remove postgres server - run: | - docker stop my-postgres - docker remove my-postgres - - - name: Add Coverage PR Comment - uses: marocchino/sticky-pull-request-comment@v2 - if: github.event_name == 'pull_request' - with: - recreate: true - header: coverage - path: coverage.md From af88e8e41cb1c7e240510e5c1360926cc05900cd Mon Sep 17 00:00:00 2001 From: Aksel Thomsen Date: Fri, 29 Nov 2024 16:25:18 +0100 Subject: [PATCH 11/19] Update check_and_co.yaml Signed-off-by: Aksel Thomsen --- .github/workflows/check_and_co.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/check_and_co.yaml b/.github/workflows/check_and_co.yaml index 1fbdfdf..32912ed 100644 --- a/.github/workflows/check_and_co.yaml +++ b/.github/workflows/check_and_co.yaml @@ -8,6 +8,9 @@ on: - main - master name: All actions +env: + R_KEEP_PKG_SOURCE: true + POSTGRES_PW: ${{secrets.TEST_POSTGRES_DB_PW}} jobs: check-current-version: name: Check current version From 56d035414ce9f3006ab6c64d637bdf0ab3c6fd10 Mon Sep 17 00:00:00 2001 From: Aksel Thomsen Date: Fri, 29 Nov 2024 16:27:41 +0100 Subject: [PATCH 12/19] Update action.yaml Signed-off-by: Aksel Thomsen --- .github/actions/setup/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index a879f2d..869816d 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -7,4 +7,4 @@ runs: if: runner.os == 'Linux' run: | docker pull postgres - docker run --name my-postgres --env POSTGRES_PASSWORD=${{env.POSTGRES_PW}} --publish 5432:5432 + docker run --name my-postgres --env POSTGRES_PASSWORD=password --publish 5432:5432 From 95c625bc20929275c998aba60a8cb4691f900b08 Mon Sep 17 00:00:00 2001 From: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:57:58 +0100 Subject: [PATCH 13/19] Update action.yaml Fix yaml formatting error. Signed-off-by: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> --- .github/actions/setup/action.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 869816d..6dd1f03 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -4,7 +4,7 @@ runs: using: "composite" steps: - name: Start local postgres server with Docker - if: runner.os == 'Linux' - run: | - docker pull postgres - docker run --name my-postgres --env POSTGRES_PASSWORD=password --publish 5432:5432 + if: runner.os == 'Linux' + run: | + docker pull postgres + docker run --name my-postgres --env POSTGRES_PASSWORD=password --publish 5432:5432 From d3ca8ab699ef74a24d248fa07c3a40b88f305327 Mon Sep 17 00:00:00 2001 From: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:04:10 +0100 Subject: [PATCH 14/19] Update action.yaml Add bash as shell Signed-off-by: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> --- .github/actions/setup/action.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 6dd1f03..0ee8b9b 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -5,6 +5,7 @@ runs: steps: - name: Start local postgres server with Docker if: runner.os == 'Linux' + shell: bash run: | docker pull postgres docker run --name my-postgres --env POSTGRES_PASSWORD=password --publish 5432:5432 From ca04bfc70f596f8ce027093ea6fedb7df72b8a3d Mon Sep 17 00:00:00 2001 From: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:26:46 +0100 Subject: [PATCH 15/19] Update action.yaml Fix error: Add image to run. Signed-off-by: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> --- .github/actions/setup/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 0ee8b9b..4d1cfa3 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -8,4 +8,4 @@ runs: shell: bash run: | docker pull postgres - docker run --name my-postgres --env POSTGRES_PASSWORD=password --publish 5432:5432 + docker run --name my-postgres --env POSTGRES_PASSWORD=${{env.POSTGRES_PW}} --publish 5432:5432 --detach postgres From ada81a5782ace5ace7d0cdf49620e65ed876f9cd Mon Sep 17 00:00:00 2001 From: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:29:28 +0100 Subject: [PATCH 16/19] Update action.yaml Set postgress password to be password Signed-off-by: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> --- .github/actions/setup/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 4d1cfa3..4bfbf51 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -8,4 +8,4 @@ runs: shell: bash run: | docker pull postgres - docker run --name my-postgres --env POSTGRES_PASSWORD=${{env.POSTGRES_PW}} --publish 5432:5432 --detach postgres + docker run --name my-postgres --env POSTGRES_PASSWORD=password --publish 5432:5432 --detach postgres From e19aea6c13330f4b8ed4ed93a54390d5f724b347 Mon Sep 17 00:00:00 2001 From: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:30:06 +0100 Subject: [PATCH 17/19] Update test-dbi.R Set postgres password to be password. Signed-off-by: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> --- tests/testthat/test-dbi.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-dbi.R b/tests/testthat/test-dbi.R index f5a9b2e..cf9df09 100644 --- a/tests/testthat/test-dbi.R +++ b/tests/testthat/test-dbi.R @@ -15,7 +15,7 @@ specs <- list( drv = RPostgres::Postgres(), dbname = "postgres", user = "postgres", - password = Sys.getenv("POSTGRES_PW"), # Stored in GH actions + password = password # Sys.getenv("POSTGRES_PW"), # Stored in GH actions port = 5432, host = "localhost" ) From 9de7420db9c7d1d128cd61b863068bf8f848f073 Mon Sep 17 00:00:00 2001 From: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:35:19 +0100 Subject: [PATCH 18/19] Update test-dbi.R Fix string error. Signed-off-by: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> --- tests/testthat/test-dbi.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-dbi.R b/tests/testthat/test-dbi.R index cf9df09..2a5b31d 100644 --- a/tests/testthat/test-dbi.R +++ b/tests/testthat/test-dbi.R @@ -15,7 +15,7 @@ specs <- list( drv = RPostgres::Postgres(), dbname = "postgres", user = "postgres", - password = password # Sys.getenv("POSTGRES_PW"), # Stored in GH actions + password = "password" # Sys.getenv("POSTGRES_PW"), # Stored in GH actions port = 5432, host = "localhost" ) From b6c2209d2f0e96477a9296155378151c96398af4 Mon Sep 17 00:00:00 2001 From: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:38:45 +0100 Subject: [PATCH 19/19] Update test-dbi.R Signed-off-by: Vladimir Obucina <44030997+vladimirobucina@users.noreply.github.com> --- tests/testthat/test-dbi.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-dbi.R b/tests/testthat/test-dbi.R index 2a5b31d..90b964f 100644 --- a/tests/testthat/test-dbi.R +++ b/tests/testthat/test-dbi.R @@ -15,7 +15,7 @@ specs <- list( drv = RPostgres::Postgres(), dbname = "postgres", user = "postgres", - password = "password" # Sys.getenv("POSTGRES_PW"), # Stored in GH actions + password = "password", # Sys.getenv("POSTGRES_PW"), # Stored in GH actions port = 5432, host = "localhost" )