name: tfsec build
on:
  pull_request:
  schedule:
  - cron:  0 23 * * *
jobs:
  build:
    name: building tfsec
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-go@v2
      with:
        stable: 'false'
        go-version: '1.16.6' # The Go version to download (if necessary) and use.
    - run: go version

    - name: Run Documentation Linter
      run: make lint-pr-checks
 
    - name: Run test
      run: make test

    - name: Sanity
      run: make sanity

    - name: Code Quality
      run: make quality

    - name: Spelling
      uses: codespell-project/actions-codespell@master
      with:
        check_filenames: true 
        skip: vendor,funcs
        ignore_words_file: .codespellignore
