Last active
May 31, 2021 13:35
-
-
Save Neradoc/fc581d60543db01afed946f8435ea7ac to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Manual commit to main | |
MOCK COMPILE,push,,refs/heads/main | |
MOCK UPLOAD,push,,refs/heads/main | |
Manual commit to not-main | |
MOCK COMPILE,push,,refs/heads/not-main | |
PR via a patch branch | |
MOCK COMPILE,push,,refs/heads/Neradoc-patch-1 | |
MOCK COMPILE,pull_request,opened,refs/pull/4/merge | |
Merge the PR | |
MOCK COMPILE,push,,refs/heads/main | |
MOCK UPLOAD,push,,refs/heads/main | |
Publish a new release on main | |
MOCK COMPILE,push,,refs/tags/1.0.3 | |
MOCK COMPILE,release,published,refs/tags/1.0.3 | |
MOCK UPLOAD,release,published,refs/tags/1.0.3 | |
Publish a new release on not-main | |
MOCK COMPILE,push,,refs/tags/0.1.0 | |
MOCK COMPILE,release,published,refs/tags/0.1.0 | |
MOCK UPLOAD,release,published,refs/tags/0.1.0 |
This file contains hidden or 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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Test CI for Circuitpython | |
on: | |
push: | |
pull_request: | |
release: | |
types: [published] | |
check_suite: | |
types: [rerequested] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flake8 pytest requests | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Mock compile all | |
run: | | |
python log_upload_message.py "MOCK COMPILE" "${{ github.event_name }}" "${{ github.event.action }}" "${{ github.ref }}" | |
- name: Mock upload to S3 | |
run: | | |
python log_upload_message.py "MOCK UPLOAD" "${{ github.event_name }}" "${{ github.event.action }}" "${{ github.ref }}" | |
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment