chore: enable spread tests #22
Workflow file for this run
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: Build and test rock | |
on: | |
pull_request: | |
branches: | |
- 'core2[24]-[78]' | |
push: | |
branches: | |
- 'core2[24]-[78]' | |
jobs: | |
build-rock: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Build rock | |
uses: canonical/craft-actions/rockcraft-pack@main | |
with: | |
rockcraft-channel: candidate | |
- name: Get rock name | |
id: vars | |
run: | | |
if [[ "${{ github.event_name }}" == "pull_request" ]] | |
then | |
echo "rockname=pr-${{ github.event.number }}" >> "$GITHUB_OUTPUT" | |
else | |
echo "rockname=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Upload rock | |
uses: actions/upload-artifact@v4 | |
with: | |
name: snapcraft-rock | |
path: '*.rock' | |
spread-tests: | |
runs-on: self-hosted | |
needs: [build-rock] | |
steps: | |
- name: Cleanup job workspace | |
run: | | |
rm -rf "${{ github.workspace }}" | |
mkdir "${{ github.workspace }}" | |
- name: Checkout repository | |
# NOTE: using v3 due to node versions on self-hosted runners | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Download rock artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: snapcraft-rock | |
path: tests | |
- name: Run spread | |
run: spread |