Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/actions/run_tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "run tests"
description: "set up and run the full environment unit test suite"
inputs:
use-tag:
description: "Whether or not to test against the tag"
required: true
default: false
CHECKOUT_TOKEN:
description: "checkout token for internal repositories"
required: false
default: ""
runs:
using: "composite"
# Maybe someday default shell will be supported for actions, not just workflows
# defaults:
# run:
# shell: bash --login -eo pipefail {0}
steps:
- run: |
echo "start script"
echo $TOKEN
echo $${{ inputs.CHECKOUT_TOKEN }}
git clone "https://${TOKEN}@github.com/pcdshub/lcls-plc-kfe-xgmd-vac" --depth 1
git clone "https://${TOKEN}@github.com/pcdshub/pytmc" --depth 1
cd pytmc
pwd
git config --global url."https://${{ inputs.CHECKOUT_TOKEN }}@github.com/".insteadOf "https://github.com/"
git submodule update --init --recursive
ls ./pytmc/tests/projects/lcls-plc-kfe-xgmd-vac
env:
TOKEN: ${{ inputs.CHECKOUT_TOKEN }}
shell: bash --login -eo pipefail {0}
28 changes: 28 additions & 0 deletions .github/workflows/composite_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Sample composite workflow

on:
pull_request:
release:
types:
- published

env:
MPLBACKEND: "agg"
QT_QPA_PLATFORM: "offscreen"

jobs:
# The latest deployed env OR the proposed env in a PR
current-tests:
environment: external-pr
defaults:
run:
shell: bash --login -eo pipefail {0}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/run_tests
with:
use-tag: true
CHECKOUT_TOKEN: ${{ secrets.ENV_SECRET }}
Loading