Skip to content

CI: drop ubuntu-18.04 #181

CI: drop ubuntu-18.04

CI: drop ubuntu-18.04 #181

Workflow file for this run

name: Test
on:
- push
- pull_request
jobs:
# Install without login
install:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- if: startsWith(matrix.os, 'ubuntu')
name: lxd should be installed
run: "/snap/bin/lxd version"
- name: Snapcraft should not be installed
shell: bash
run: "! snapcraft --version"
- name: Run action
uses: ./
- name: Snapcraft should be installed on macOS/Ubuntu
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
run: snapcraft --version
- name: Snapcraft should track the `stable` channel on Linux
if: startsWith(matrix.os, 'ubuntu')
shell: bash
run: |
snap info snapcraft
grep -Eq 'tracking:\s+latest/stable' <(snap info snapcraft)
- name: Snapcraft should not be installed on Windows
if: startsWith(matrix.os, 'windows')
shell: bash
run: "! snapcraft --version"
# Install with login
login:
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: User should not be logged in
run: "! snapcraft whoami"
- name: Run action
uses: ./
- name: User should be logged in
run: snapcraft whoami
# Install with channel
install-channel:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Run action
uses: ./
with:
channel: candidate
- name: Snapcraft should track the `candidate` channel on Linux
shell: bash
run: |
snap info snapcraft
grep -Eq 'tracking:\s+latest/candidate' <(snap info snapcraft)