From afbe31af2546443dc7c9a3de2f684d2759d4b837 Mon Sep 17 00:00:00 2001 From: Ben Bond-Lamberty Date: Fri, 18 Aug 2023 16:45:21 -0400 Subject: [PATCH] Add GitHub Action and badge --- .github/workflows/check-workflow.yaml | 41 +++++++++++++++++++++++++++ README.md | 5 ++++ 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/check-workflow.yaml diff --git a/.github/workflows/check-workflow.yaml b/.github/workflows/check-workflow.yaml new file mode 100644 index 0000000..b9f91da --- /dev/null +++ b/.github/workflows/check-workflow.yaml @@ -0,0 +1,41 @@ +on: + push: + branches: + - main + - master + pull_request: + branches: + - main + - master + - portage +name: Check Portage data workflow + +jobs: + render: + name: Check data workflow + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: ubuntu-latest, r: release} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v2 + - uses: r-lib/actions/setup-r@v2 + - uses: r-lib/actions/setup-pandoc@v2 + - name: Install any needed packages + run: | + install.packages(c("dplyr", "tidyr", "remotes" "readr", "lubridate")) + remotes::install_github('COMPASS-DOE/compasstools') + shell: Rscript {0} + - name: Check workflow + run: | + cd portage/ + Rscript --verbose ./driver.R diff --git a/README.md b/README.md index 39b8aa4..160e015 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ # data-workflows + + +[![check-workflow](https://github.com/COMPASS-DOE/data-workflows/actions/workflows/check-workflow.yaml/badge.svg)](https://github.com/COMPASS-DOE/data-workflows/actions/workflows/check-workflow.yaml) + + Sensor data workflows and processing scripts