Skip to content

509 [davidbrownell] on main #509

509 [davidbrownell] on main

509 [davidbrownell] on main #509

# ----------------------------------------------------------------------
# |
# | build_and_test.yaml
# |
# | David Brownell <[email protected]>
# | 2023-12-27 11:22:25
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Brownell 2023-24
# | Distributed under the MIT License.
# |
# ----------------------------------------------------------------------
name: "Build and Test"
run-name: ${{ github.run_number }} [${{ github.actor }}] on ${{ github.ref_name }}
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: '0 0 * * *' # Once a day at 12am UTC
workflow_dispatch:
jobs:
# ----------------------------------------------------------------------
action_contexts:
name: "Display GitHub Action Contexts"
uses: davidbrownell/dbrownell_DevTools/.github/workflows/callable_display_action_contexts.yaml@main
# ----------------------------------------------------------------------
build_and_test:
name: "Build and Test"
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
env:
COLUMNS: "200"
SIMULATE_TERMINAL_CAPABILITIES_SUPPORTS_COLORS: "1"
PYTHONIOENCODING: "UTF-8"
steps:
# Ensure that windows machines support long paths
- name: git Long File Path Support on Windows
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
git config --system core.longpaths true
- name: "Checkout Source"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Initialize"
id: initialize
uses: davidbrownell/dbrownell_DevTools/.github/actions/initialize@main
with:
operating_system: ${{ matrix.os }}
- name: Build and Test
uses: ./.github/actions/build_and_test
with:
operating_system: ${{ matrix.os }}
script_prefix: ${{ steps.initialize.outputs.script_prefix }}
script_extension: ${{ steps.initialize.outputs.script_extension }}
shell_name: ${{ steps.initialize.outputs.shell_name }}
source_command: ${{ steps.initialize.outputs.source_command }}
sudo_command: ${{ steps.initialize.outputs.sudo_command }}