Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Always use YAML multi-line strings for shell commands, to simplify quoting:

    • Instead of this:

      • Code Block
        languageyaml
        # BAD! This won't parse!
        commandrun: bash -c "./managedo.py blah_blah --extra \"{'offset_time': '2023-06-14T04:20:00'}\""
    • Use this:

      • Code Block
        languageyaml
        commandrun: |
          bash -c "./managedo.py blah_blah --extra \"{'offset_time': '2023-06-14T04:20:00'}\""

...

Code Block
languageyaml
name: "Nightly Unit Tests"

on:
  push:
    branches:
      - "**/*nightly*"
  schedule:
    # Run at 2:22am early every morning Eastern time (6/7:22 UTC)
    # https://crontab.guru/#22_7_%2a_%2a_%2a
    - cron: "22 7 * * *"
  workflow_dispatch:

defaults:
  run:
    shell: bash

permissions:
  contents: read

concurrency:
  group: "${{ github.workflow }}-${{ github.ref }}"
  cancel-in-progress: true

jobs:
  tests:
    name: "Python ${{ matrix.python-version }} tests"
    runs-on: ubuntu-20.04

    strategy:
      matrix:
        python-version:
          - "3.8"
          - "3.11"

    steps:
      - name: "Check out the repo"
        uses: "actions/checkout@v3"

      - name: "Set up Python"
        uses: "actions/setup-python@v4"
        with:
          python-version: "${{ matrix.python-version }}"
          
      - name: "Do the thing"
        run: |
          python -m tox -- -rfsEX

Help

...