This is cross posted on the RStudio Community site. I am using r-lib/setup-r-dependencies#v2 for a bookdown project on GitHub action. However, the job is stalling when pak tries to create a lock file. Here is an example run , and here is the workflow.
As you can see, eventually the job just times out.
The issue seems similar to this post. The solution there was to use the most current RSPM, but I believe that is already what I am using (I don't specify anything different in the workflow).
Any ideas on what might be causing this?
Edit: Here is the full yaml code for the workflow (linked above)
on:
push:
branches: [main, master]
workflow_dispatch:
name: bookdown
jobs:
bookdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout#v2
- 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:
cache-version: 1
- name: Cache bookdown results
uses: actions/cache#v2
with:
path: _bookdown_files
key: bookdown-${{ hashFiles('**/*Rmd') }}
restore-keys: bookdown-
- name: Build site
run: bookdown::render_book("index.Rmd", quiet = TRUE)
shell: Rscript {0}
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action#4.1.4
with:
branch: gh-pages
folder: _book
Related
I'm tasked to automate a dotnet build and deployment process on GitHub. Earlier the engineers were manually building the solution on VScode and didn't face this issue.
Here's the Error screenshot: Build Error Screenshot
Here's my workflow file:
name: Build_Artifacts_Pipeline
on:
push:
branches:
- 'cs1_pipeline_test'
jobs:
build_artifacts:
runs-on: [windows-2019]
steps:
- name: pre-checkout
run:
git config --system core.longpaths true
- name: checkout repo
uses: actions/checkout#v3
- name: Setup MSBuild
uses: microsoft/setup-msbuild#v1.1
with:
vs-version: '15.0'
- name: Create a deploy folder
run: |
cd
mkdir D:\a\CS\Deploy_Reports
- name: Setup dotnet
uses: actions/setup-dotnet#v2
with:
dotnet-version: '5.0'
DOTNET_NOLOGO: 'true'
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
- name: Setup NuGet
uses: Nuget/setup-nuget#v1
with:
nuget-version: '6.0.2'
- name: Cache NuGet Packages
uses: actions/cache#v1
id: cache
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
# - name: NuGet Restore
# if: steps.cache.outputs.cache-hit != 'true'
# run: nuget restore ./WBC.sln
- name: Build Dotnet Framework Project
run: |
nuget install ./WBC.UI.Reporting.Web/packages.config -Source http://nuget.org/api/v2
msbuild ./WBC.UI.Reporting.Web/WBC.UI.Reporting.Web.csproj /p:GenerateSerializationAssemblies=Off /t:Build /p:DeployOnBuild=true /p:Configuration=Release /p:PublishProfile=NewProfile.pubxml /p:OutDir=D:\a\CS\Deploy_Reports\
Here's my csproj: .csproj
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout#v2
# Runs a single command using the runners shell
- name: terratest
run: echo Github pat token is ${{ secrets.TF_GITHUB_PAT }}
- name: checkout t2form-k8s repo
uses: actions/checkout#v2
with:
repository: harikalyank/t2form-k8s
token: ${{ secrets.TF_GITHUB_PAT }}
ref: master
The above one is my GH-workflow and it's getting failed to clone repo:t2form-k8s.
error: Warning: The save-state command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Error: Input required and not supplied: token
I created Pat/secret token as well on repository level with name:TF_GITHUB_PAT
trying to implement a workflow on Github actions that will run a test script with the functions of my package and ideally print/export out the results. I am new to the YAML syntax and would appreciate any help.
This is the workflow I currently have:
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
name: Test-Script
jobs:
build:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
steps:
- uses: actions/checkout#v2
- uses: r-lib/actions/setup-r#v1
with:
r-version: ${{ matrix.config.r }}
- uses: r-lib/actions/setup-pandoc#v1
- name: Test against test script
run: |
/R/test_script.R #file path in repo
shell: Rscript {0}
I get the erorr: Error: Error: unexpected '/' in "/". I have tried multiple adjustments but always get that error or another saying that the file cannot be found. I would also like to print out/export out the results but I do not know how to do so.
Would appreciate any help please. Thank you.
I like to test the mail functionally from a WordPress plugin via a Github Workflow and Sendria (MailTrap)
This is my working workflow:
# Based on https://github.com/wp-cli/scaffold-command/blob/f9bad3dd7224d5684d950d31c486df70905e386f/templates/plugin-github.mustache
name: WordPress Test
on: [push]
env:
WP_TESTS_DIR: /github/home/wp-tests/wordpress-tests-lib
WP_CORE_DIR: /github/home/wp-tests/wordpress
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [7.2]
wordpress-version: [latest]
container:
image: junaidbhura/wp-tests:php-${{ matrix.php-version }}
services:
mysql:
image: mysql:5.7.27
env:
MYSQL_ROOT_PASSWORD: root
steps:
- name: Checkout repository
uses: actions/checkout#v1
- name: Install Composer dependencies
run: |
composer install --no-dev
composer global require "phpunit/phpunit=6.1.0"
composer global require "yoast/phpunit-polyfills=1.0.3"
- name: Install WordPress test suite
run: bash bin/install-wp-tests.sh wordpress_test root root mysql ${{ matrix.wordpress-version }}
- name: Tests
run: $HOME/.composer/vendor/bin/phpunit --config=phpunit-integration.xml
This workflow
checkout my plugin
install composer dependencies
install the WordPress test suite
run the Tests (which should contain mail tests)
Now I like to add Sendria to this flow by adding this action right above the first step:
- name: Start Sendira
uses: upgundecha/start-sendria-github-action#v1.0.0
with:
smtp-port: 1025
http-port: 1080
To test that Sendria is running I check the endpoint via curl with an additional step:
- name: Test
run: |
curl -LI http://127.0.0.1:1080
And this "Test" fails:
I tried the workflow locally with act where this step worked but have no idea how to get this working on Github.
I've also created a test repo on Github here.
I've been unsucessfully trying to setup lintr package with GitHub actions (circleCi would be good too, since it's a private repo) to check PR and pushes.
My project is a book so i don't need package build checks, but only enforcing style since there are serveral authors.
I've read this readme and this article but i couldn't figure out what should a .yml file look like is this case.
Figured that out. Still need to cache lintr but at least it is working:
on:
push:
branches:
- master
pull_request:
branches:
- master
name: lint
jobs:
lint:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout#v2
- uses: r-lib/actions/setup-r#master
- name: Install lintr
run: install.packages("lintr")
shell: Rscript {0}
- name: Lint
run: lintr::lint_dir(linters = lintr::with_defaults(assignment_linter = NULL, line_length_linter = NULL, spaces_left_parentheses_linter = NULL), pattern = '[.]R$|[.]Rmd')
shell: Rscript {0}