♻️ Rewrite for Docker #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test action | |
on: | |
workflow_run: | |
workflows: ["Docker CI"] | |
types: | |
- completed | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test-lemlib: | |
name: "Testing LemLib" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: LemLib/LemLib | |
ref: 6fc0838e0aa1de03d7864002888f5d874b691910 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ./action/ | |
- name: Test With Upload | |
id: test | |
uses: ghcr.io/abucky0/pros-build | |
- name: Upload Artifact | |
id: upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.test.outputs.name }} | |
path: "template/*" | |
- name: Add Artifact to Job Summary | |
run: 'echo "### 📦 Artifact url: ${{ steps.upload.outputs.artifact-url}}" >> $GITHUB_STEP_SUMMARY' | |
test-lemlib-nohash: | |
name: "Testing LemLib Without Adding the Commit Hash" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: LemLib/LemLib | |
ref: 6fc0838e0aa1de03d7864002888f5d874b691910 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ./action/ | |
- name: Test With Upload No Hash | |
id: test | |
uses: ./action/ | |
with: | |
no_commit_hash: true | |
- name: Upload Artifact | |
id: upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.test.outputs.name }} | |
path: "template/*" | |
- name: Add Artifact to Job Summary | |
run: 'echo "### 📦 Artifact url: ${{ steps.upload.outputs.artifact-url}}" >> $GITHUB_STEP_SUMMARY' | |
test-lemlib-without-upload: | |
name: "Testing LemLib Without Uploading an Artifact" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: LemLib/LemLib | |
ref: 6fc0838e0aa1de03d7864002888f5d874b691910 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ./action/ | |
- name: Test Without Upload | |
uses: ./action/ | |
test-ez: | |
name: "Testing EZ-Template" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: EZ-Robotics/EZ-Template | |
ref: v3.0.1 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ./action/ | |
- name: Test With Upload + Bonus Files | |
id: test | |
uses: ./action/ | |
- name: Upload Artifact | |
id: upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.test.outputs.name }} | |
path: "template/*" | |
- name: Add Artifact to Job Summary | |
run: 'echo "### 📦 Artifact url: ${{ steps.upload.outputs.artifact-url}}" >> $GITHUB_STEP_SUMMARY' | |
test-lemlib-error: | |
name: "Testing LemLib Fail" | |
runs-on: ubuntu-latest | |
# Success if test fails, failure if test succeeds | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: LemLib/LemLib | |
ref: 7ae0a601276c4df5eb8957495b9c4fa2093d72e3 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ./action/ | |
- name: Test With Upload + Bonus Files | |
id: test | |
uses: ./action/ | |
continue-on-error: true | |
- name: test-lemlib-error | |
run: | | |
if [[ "${{ steps.test.outcome }}" == "success" ]]; then | |
echo "Test With Upload + Bonus Files step succeeded, failing test-lemlib-error step" | |
exit 1 | |
fi |