ci: ignore release candidate versions in sync-version-with-upstream #105
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: Pull Request | |
on: | |
pull_request: | |
branches: | |
- candidate | |
paths: | |
- "snap/**" | |
- ".github/**" | |
- "test/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-test: | |
name: Build & Test Snap (amd64) | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🧪 Build snap on amd64 | |
uses: snapcrafters/ci/test-snap-build@main | |
with: | |
install: true | |
- name: Setup MicroK8s | |
uses: balchua/[email protected] | |
- name: Setup Docker | |
run: | | |
sudo snap install docker | |
sudo addgroup --system docker; sudo adduser $USER docker | |
newgrp docker | |
sudo snap disable docker; sudo snap enable docker | |
- name: Test snap - Kubernetes | |
run: | | |
terraform -chdir=test/kubernetes init | |
terraform -chdir=test/kubernetes apply -auto-approve | |
kubectl get ns snaptest | |
- name: Test snap - Docker | |
run: | | |
terraform -chdir=test/docker init | |
terraform -chdir=test/docker apply -auto-approve | |
# Loop until we can reach the container we just created | |
while ! curl -s localhost:8000; do | |
# If unsuccessful wait for 5 secs before retrying | |
sleep 5 | |
((i++)) | |
# If this is our 10th attempt, bail with an error | |
if [[ $i -gt 10 ]]; then | |
echo "Unable to reach container" | |
exit 1 | |
fi | |
done | |