Skip to content
Open
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
81 changes: 81 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Dev Build and Test

on:
push:
branches:
- dev
pull_request:
branches:
- dev

permissions:
contents: read

jobs:
build-dev:
runs-on: ubuntu-latest

environment:
name: development

steps:
- name: Set Timestamp
id: vars
run: echo "ts=$(date +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT

- name: Build package
run: |
mkdir ~/.ssh
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
echo "${{ secrets.BUILD_USER_PRIVATE_KEY }}" > private_key
chmod 500 private_key
ssh ${{ secrets.BUILD_SSH_CONNECTION }} -i private_key
- name: Download manifest
run: |
scp -B -q -i private_key ${{ secrets.BUILD_SCP_CONNECTION }}:"files.txt" .
echo "Found build artifacts:"
cat files.txt
- name: Download package
run: |
mkdir dist
while IFS= read -r file; do
echo "Downloading file: $file"
scp -B -q -i private_key ${{ secrets.BUILD_SCP_CONNECTION }}:"$file" dist/
done < files.txt
- name: Upload Dev Artifacts
uses: actions/upload-artifact@v4
with:
name: dev-dist-${{ steps.vars.outputs.ts }}
path: dist/*

test-dev:
runs-on: ubuntu-latest
needs:
- build-dev

environment:
name: test

steps:
- name: Retrieve test distributions
uses: actions/download-artifact@v4
with:
name: dev-dist-${{ steps.vars.outputs.ts }}
path: dist/

- name: Upload package
run: |
mkdir ~/.ssh
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
echo "${{ secrets.TEST_USER_PRIVATE_KEY }}" > private_key
chmod 500 private_key
scp -B -q -i private_key ${{ secrets.TEST_SCP_ARGS }} dist/*.whl ${{ secrets.TEST_SCP_CONNECTION }}:artifacts/

- name: Run test
run: |
ssh ${{ secrets.TEST_SSH_CONNECTION }} -i private_key

- name: Download report
if: always()
run: |
scp -B -q -i private_key ${{ secrets.TEST_SCP_ARGS }} ${{ secrets.TEST_SCP_CONNECTION }}:"report.md" $GITHUB_STEP_SUMMARY