aws.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: aws
  2. # Run this workflow every time the lint workflow successfully completes
  3. on:
  4. workflow_run:
  5. workflows: ["lint"]
  6. types:
  7. - completed
  8. jobs:
  9. # Set the job key. The key is displayed as the job name
  10. # when a job name is not provided
  11. aws:
  12. # Run only if lint step succeeded
  13. if: ${{ github.event.workflow_run.conclusion == 'success' }}
  14. # Set the type of machine to run on
  15. runs-on: ubuntu-latest
  16. strategy:
  17. fail-fast: false
  18. matrix:
  19. python-version: ['3.8']
  20. cloud-provider: ['aws']
  21. steps:
  22. - name: Checkout code
  23. uses: actions/checkout@v2
  24. - name: Setup Python
  25. uses: actions/setup-python@v2
  26. with:
  27. python-version: ${{ matrix.python-version }}
  28. - name: Cache pip dir
  29. uses: actions/cache@v2
  30. with:
  31. path: ~/.cache/pip
  32. key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('**/setup.py', '**/requirements.txt') }}
  33. - name: Install required packages
  34. run: pip install tox
  35. - name: Run tox
  36. run: tox -e py${{ matrix.python-version }}-${{ matrix.cloud-provider }}
  37. env:
  38. PYTHONUNBUFFERED: "True"
  39. # aws
  40. AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
  41. AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
  42. - name: Coveralls
  43. uses: AndreMiras/coveralls-python-action@develop
  44. with:
  45. github-token: ${{ secrets.GITHUB_TOKEN }}
  46. flag-name: run-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
  47. parallel: true