Skip to content

Commit

Permalink
Merge pull request #10 from cradle8810/test_on_runner
Browse files Browse the repository at this point in the history
Add goss test
  • Loading branch information
cradle8810 authored Apr 23, 2024
2 parents 7305fb6 + 8a00fc4 commit 822e89b
Show file tree
Hide file tree
Showing 4 changed files with 240 additions and 14 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Workflows

on: [push, pull_request]

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Shellcheck Version Check
run: shellcheck -V
- name: Run ShellCheck
run: shellcheck mkRAMDisk.sh

mount-and-test:
runs-on: macos-14
steps:
- name: checkout
uses: actions/checkout@v4

- name: Goss downloaded cache
uses: actions/cache/restore@v4
with:
path: /tmp/goss
key: mkramdisk-goss

- name: Download Goss
run: |
curl -L https://github.com/goss-org/goss/releases/download/v0.4.6/goss-darwin-arm64 \
-o /tmp/goss && \
chmod +x /tmp/goss
- name: Store goss cache
uses: actions/cache/save@v4
with:
path: /tmp/goss
key: mkramdisk-goss

- name: Run mkRAMDisk.sh
run: |
./mkRAMDisk.sh
- name: Run goss (mkRAMDisk.sh)
run: |
/tmp/goss -g tests/goss_mount.yaml validate
env:
GOSS_USE_ALPHA: 1

- name: Run ejectRAMDisk.sh
run: |
mount && \
ls /Volumes && \
./ejectRAMDisk.sh
- name: Run goss (ejectRAMDisk.sh)
run: |
/tmp/goss -g tests/goss_eject.yaml validate
env:
GOSS_USE_ALPHA: 1
14 changes: 0 additions & 14 deletions .github/workflows/lint.yml

This file was deleted.

4 changes: 4 additions & 0 deletions tests/goss_eject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
file:
/Volumes/RAMDisk:
exists: false
contents: []
176 changes: 176 additions & 0 deletions tests/goss_mount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
file:
/Volumes/RAMDisk:
exists: true
mode: "0775"
filetype: directory
contents: []
/Volumes/RAMDisk/.Saved Application State:
exists: true
mode: "0777"
filetype: directory
contents: []
/Volumes/RAMDisk/.XCODEDebug:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/Autosave Information:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/Chrome:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/Finder:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/Firefox:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/Homebrew:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/Metadata:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/Microsoft Remote Desktop Beta:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/Photos:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/Photos_Cache.noindex:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/QuickLook:
exists: true
mode: "0777"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/QuickLook32:
exists: true
mode: "0777"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/Safari:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/Safari_CloudKit:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/ansible:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/com.apple.Automator:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/com.apple.Photos:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/com.apple.appstore:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/com.apple.iLifeMediaBrowser.ILPhotosTranscodeCache:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/com.apple.iconservices:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/com.apple.nsurlsessiond:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/com.apple.safari:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/com.evernote.Evernote:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/com.overmacs.photosweeperpaddle:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/discord:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/fsCachedData:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/iMazing:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/lsd:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.cache/qlmanage:
exists: true
mode: "0777"
filetype: directory
contents: []
/Volumes/RAMDisk/.logs:
exists: true
mode: "0777"
filetype: directory
contents: []
/Volumes/RAMDisk/.tmp:
exists: true
mode: "0755"
filetype: directory
contents: []
/Volumes/RAMDisk/.tmpdirT:
exists: true
mode: "0777"
filetype: directory
contents: []

0 comments on commit 822e89b

Please sign in to comment.