-
Notifications
You must be signed in to change notification settings - Fork 15
82 lines (64 loc) · 2.37 KB
/
check-windows.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
on:
push:
branches: main
pull_request:
name: check-windows
jobs:
check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- { os: windows-latest, r: 'release', args: "--no-manual" }
env:
CRAN: ${{ matrix.config.cran }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
DBROOTPASS: r2N5y7V*
DITTODB_ENABLE_PG_TESTS: true
DITTODB_ENABLE_MARIA_TESTS: true
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-tinytex@v2
if: contains(matrix.config.args, 'no-manual') == false
- name: Cache Windows Chocolatey downloads
uses: actions/cache@v3
if: contains(runner.os, 'windows')
with:
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
key: Choco-${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('DESCRIPTION') }}
- name: Install databases (windows)
shell: bash
run: |
choco install mariadb
# can use postgresql13, but RPostgreSQL still has issues with that
# https://github.com/tomoakin/RPostgreSQL/issues/112
choco install postgresql11 --params '/Password:${{ env.DBROOTPASS }}' --paramsglobal
choco install psqlodbc
# Needed to get psql on the path
echo "$PGBIN" >> $GITHUB_PATH
# change the password for mariadb
mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '${{ env.DBROOTPASS }}';"
if: contains(runner.os, 'windows')
- name: Install R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck, httptest
- name: Setup databases
run: bash db-setup/populate-dbs.sh
env:
PGPASSWORD: ${{ env.DBROOTPASS }}
MYSQL_PWD: ${{ env.DBROOTPASS }}
- name: Check
shell: Rscript {0}
run: rcmdcheck::rcmdcheck(args = '${{ matrix.config.args }}', error_on = 'note', check_dir = 'check')
- name: Upload check results
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check