Merge pull request #29 from collegevine/hardcode-content-type #188
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples | |
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
on: | |
push: | |
branches: main | |
pull_request: | |
branches: main | |
name: R-CMD-check | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
R-CMD-check: | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: ubuntu-latest, r: '4.1.2'} | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
R_KEEP_PKG_SOURCE: yes | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
MLFLOW_TRACKING_PASSWORD: ${{ secrets.MLFLOW_TRACKING_PASSWORD }} | |
MLFLOW_TRACKING_URI: ${{ secrets.MLFLOW_TRACKING_URI }} | |
MLFLOW_TRACKING_USERNAME: ${{ secrets.MLFLOW_TRACKING_USERNAME }} | |
S3_URI: ${{ secrets.S3_URI }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
http-user-agent: ${{ matrix.config.http-user-agent }} | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-renv@v2 | |
- name: Install libgit2-dev for git2r | |
run: | | |
sudo apt-get update | |
sudo apt-get install libgit2-dev | |
- name: Check | |
shell: Rscript {0} | |
run: install.packages("devtools"); devtools::check(error_on = "note") | |
clobber-db: | |
needs: R-CMD-check | |
runs-on: ubuntu-latest | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
steps: | |
- name: Install Postgres | |
run: | | |
sudo apt-get update | |
sudo apt-get install --yes postgresql postgresql-client | |
- name: Clobber | |
run: | | |
psql -d $DATABASE_URL -c 'DELETE FROM tags;' | |
psql -d $DATABASE_URL -c 'DELETE FROM metrics;' | |
psql -d $DATABASE_URL -c 'DELETE FROM latest_metrics;' | |
psql -d $DATABASE_URL -c 'DELETE FROM params;' | |
psql -d $DATABASE_URL -c 'DELETE FROM runs;' | |
psql -d $DATABASE_URL -c 'DELETE FROM experiment_tags;' | |
psql -d $DATABASE_URL -c 'DELETE FROM model_versions;' | |
psql -d $DATABASE_URL -c 'DELETE FROM registered_models;' | |
psql -d $DATABASE_URL -c 'DELETE FROM model_version_tags;' |