From 8d815625623a2e870faa244e173bcc1f504f9fa4 Mon Sep 17 00:00:00 2001 From: pixup1 Date: Sat, 30 Nov 2024 20:27:31 +0100 Subject: [PATCH] Fix CI --- .github/workflows/r-checks.yml | 43 ++++++++++++++++ .github/workflows/r-tests.yml | 90 ---------------------------------- R/main.R | 2 +- 3 files changed, 44 insertions(+), 91 deletions(-) create mode 100644 .github/workflows/r-checks.yml delete mode 100644 .github/workflows/r-tests.yml diff --git a/.github/workflows/r-checks.yml b/.github/workflows/r-checks.yml new file mode 100644 index 0000000..6e00481 --- /dev/null +++ b/.github/workflows/r-checks.yml @@ -0,0 +1,43 @@ +name: R Checks + +on: + push: + branches: + - main + - dev + pull_request: + branches: + - main + - dev + +jobs: + checks: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libharfbuzz-dev libfribidi-dev libfreetype6-dev pkg-config libcurl4-openssl-dev + + - name: Setup R environment + uses: r-lib/actions/setup-r@v2 + with: + r-version: 'latest' + + - name: Install devtools and package dependencies + run: | + Rscript -e 'install.packages("devtools", dependencies = NA)' + Rscript -e 'install.packages("lintr", dependencies = NA)' + Rscript -e 'devtools::install_deps(dep = TRUE)' + + - name: Check package and tests + run: | + Rscript -e 'devtools::check()' + + - name: Check linting + run: | + Rscript -e 'lintr::expect_lint_free()' diff --git a/.github/workflows/r-tests.yml b/.github/workflows/r-tests.yml deleted file mode 100644 index 1c84508..0000000 --- a/.github/workflows/r-tests.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: R Tests - -on: - push: - branches: - - main - - dev - pull_request: - branches: - - main - - dev - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libharfbuzz-dev libfribidi-dev libfreetype6-dev pkg-config libcurl4-openssl-dev - - - name: Setup R environment - uses: r-lib/actions/setup-r@v2 - with: - r-version: 'latest' - - - name: Install devtools and package dependencies - run: | - Rscript -e 'install.packages("devtools", dependencies = NA)' - Rscript -e 'devtools::install_deps(dep = TRUE)' - - - name: Run R tests - run: | - Rscript -e 'devtools::test()' - - check: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libharfbuzz-dev libfribidi-dev libfreetype6-dev pkg-config libcurl4-openssl-dev - - - name: Setup R environment - uses: r-lib/actions/setup-r@v2 - with: - r-version: 'latest' - - - name: Install devtools and package dependencies - run: | - Rscript -e 'install.packages("devtools", dependencies = NA)' - Rscript -e 'devtools::install_deps(dep = TRUE)' - - - name: Check package - run: | - Rscript -e 'devtools::check()' - - linter: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libharfbuzz-dev libfribidi-dev libfreetype6-dev pkg-config libcurl4-openssl-dev - - - name: Setup R environment - uses: r-lib/actions/setup-r@v2 - with: - r-version: 'latest' - - - name: Install devtools and package dependencies - run: | - Rscript -e 'install.packages("devtools", dependencies = NA)' - Rscript -e 'devtools::install_deps(dep = TRUE)' - - - name: Check linting - run: | - Rscript -e 'lintr::expect_lint_free()' \ No newline at end of file diff --git a/R/main.R b/R/main.R index ee59e04..e41f4a1 100644 --- a/R/main.R +++ b/R/main.R @@ -1 +1 @@ -print("Bonjour INSA !") \ No newline at end of file +print("Bonjour INSA !")