Skip to content

Commit

Permalink
feat: create starter repo
Browse files Browse the repository at this point in the history
  • Loading branch information
PCain02 committed Nov 12, 2024
1 parent 01d907f commit a23c99e
Show file tree
Hide file tree
Showing 12 changed files with 1,001 additions and 2 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Basic workflow
name: build

# Allow write permissions
permissions:
contents: write

# Use more columns for terminal output
env:
COLUMNS: 120
PYTHONIOENCODING: utf8

# Controls when the action will run
# Workflow begins with push or PR events
# Focuses on the main branch only
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Create a job matrix with different OSes
jobs:
build:
# do not allow a build to run for more than 5 minutes
timeout-minutes: 5
# Use a matrix strategy to run on multiple OSes and Python versions
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Test on multiple OSes and Python versions
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.12"]
# Define the workflow steps
steps:
# Checkout the code of the repository
- name: Check out Repository Code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Setup Python for the current language version
- name: Setup Python ${{ matrix.python-version }}
if: always()
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Install pip
- name: Install Pip
if: always()
run: |
pip install -U pip
python -m pip install --user pipx
# Install poetry
- name: Install Poetry and Project Dependencies
if: always()
run: |
pipx install poetry
pipx list
cd exam
poetry install
# Confirm correctness with execexam and show
# detailed report information
- name: Confirm Correctness with ExecExam
if: always()
run: |
cd exam
poetry run execexam . ./tests/ --report trace --report status --report failure --report code --report setup --no-fancy
# Run GatorGrader: use the gatorgrade.yml in repository's root;
# note that this runs execexam for some of the checks
- name: Run GatorGrader with GatorGrade
if: always()
run: |
pipx install gatorgrade
pipx list
cd exam
gatorgrade --report env md GITHUB_STEP_SUMMARY
# Get the current time
- name: Get the Current Time
uses: josStorer/get-current-time@v2
if: always()
id: current-time
with:
format: YYYYMMDD-HH-mm-ss
utcOffset: "-05:00"
# Write the collected GatorGrade data to the designated branch
- name: Write Collected Data to Designated Branch
uses: GatorEducator/[email protected]
if: always()
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
branch: insight
path: insight/insight-report-${{steps.current-time.outputs.formattedTime}}.json
source: env
source-arg: JSON_REPORT
Loading

0 comments on commit a23c99e

Please sign in to comment.