name: packer

on:
  push:
    branches:
      - DEV

jobs:
  check:

    env:
      R_REMOTES_NO_ERRORS_FROM_WARNINGS: true

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: r-lib/actions/setup-pandoc@v1

      - uses: r-lib/actions/setup-r@v1
        with:
          r-version: ${{ matrix.config.r }}
          http-user-agent: ${{ matrix.config.http-user-agent }}
          use-public-rspm: true

      - uses: r-lib/actions/setup-r-dependencies@v1
        with:
          extra-packages: packer

      - name: Check minification
        run: Rscript -e "packer:::are_minified('inst/packer')"
