Merge pull request #396 from saturncloud/dependabot/github_actions/do… #274
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
name: Validate Examples | |
on: | |
# Run manually by clicking a button in the UI | |
workflow_dispatch: | |
# always run CI on PRs and on pushes to release and main | |
pull_request: | |
push: | |
branches: | |
- "release*" | |
- main | |
jobs: | |
test: | |
name: ${{ matrix.task }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- task: linting | |
- task: validating-examples | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.ECR_PUBLIC_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.ECR_PUBLIC_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- name: linting | |
if: matrix.task == 'linting' | |
shell: bash | |
run: | | |
pip install --upgrade black[jupyter] flake8 nbqa | |
Rscript -e "install.packages('lintr')" | |
make lint | |
- name : validating-examples | |
shell: bash | |
run: | | |
pip install --upgrade requests jsonschema ruamel.yaml | |
python .ci/validate-examples.py --examples-dir $(pwd)/examples |