From 6f56e3dc745f2ca4f7c1a319de40e076e3909f08 Mon Sep 17 00:00:00 2001 From: pixup1 Date: Sun, 1 Dec 2024 01:19:53 +0100 Subject: [PATCH] Fix CI --- .github/workflows/r-checks.yml | 43 ++++++++++++++++ .github/workflows/r-tests.yml | 90 ---------------------------------- .gitignore | 3 +- R/main.R | 2 +- 4 files changed, 46 insertions(+), 92 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..acf6b46 --- /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::lint_package(); if (length(lintr::lint_package()) > 0) quit(status = 1)" 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/.gitignore b/.gitignore index e6ebd39..5057694 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .vscode/* -.directory \ No newline at end of file +.directory +*.Rcheck \ 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 !")