Skip to content

Commit

Permalink
ci(test): Separate scheduled test from main one
Browse files Browse the repository at this point in the history
To clean YAML file and know the difference.
  • Loading branch information
5ouma committed Jan 1, 2024
1 parent e2377b8 commit 78a80a3
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 24 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/detail-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Detail Test

on:
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:

jobs:
Test:
strategy:
matrix:
os: [Ubuntu-Latest, macOS-Latest]
runs-on: ${{ matrix.os }}

steps:
- name: Remove Python files
run: rm -fv /Library/Frameworks/Python.framework/Versions/3.12/bin/{2to3-3.12,idle3.12,pydoc3.12,python3.12,python3.12-config}

- name: Skip mas
id: skip
if: ${{ matrix.os == 'macOS-Latest' }}
run: |
declare -r HOMEBREW_BUNDLE_MAS_SKIP="$(curl -s https://raw.githubusercontent.com/5ouma/dotfiles/${GITHUB_HEAD_REF:-HEAD}/data/Brewfile | sed -nE 's/^mas.* ([0-9]+)/\1/gp' | tr '\n' ' ')"
echo "HOMEBREW_BUNDLE_MAS_SKIP=$HOMEBREW_BUNDLE_MAS_SKIP" | tee -a "$GITHUB_OUTPUT"
- name: Run setup
env:
SHELL: null
SETUP_SKIP_installDavinciResolve: true
SETUP_SKIP_loginGitHubCli: true
HOMEBREW_BUNDLE_MAS_SKIP: ${{ steps.skip.outputs.HOMEBREW_BUNDLE_MAS_SKIP }}
run: zsh <(curl -sL dotup.vercel.app/${GITHUB_HEAD_REF:-HEAD}) --yes

- name: Launch New Login Shell
run: exec zsh -ilexc exit
26 changes: 2 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ on:
paths:
- "setup"
- ".github/workflows/test.yml"
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:

jobs:
Test:
Expand All @@ -34,32 +31,13 @@ jobs:
[ "$(uname)" = 'Darwin' ] && brew install 5ouma/formula/mksei blacktop/tap/lporg || :
- name: Run setup
if: ${{ github.event_name != 'schedule' }}
env:
SHELL: null
SETUP_SKIP_installApps: true
SETUP_SKIP_installDavinciResolve: true
SETUP_SKIP_loginGitHubCli: true
SETUP_SKIP_restoreLaunchpad: true
run: |
export SHELL="$SHELL"
zsh <(curl -sL dotup.vercel.app/${GITHUB_HEAD_REF:-HEAD}) --yes
- name: Skip mas
id: skip
if: ${{ github.event_name == 'schedule' && matrix.os == 'macOS-Latest' }}
run: |
declare -r HOMEBREW_BUNDLE_MAS_SKIP="$(curl -s https://raw.githubusercontent.com/5ouma/dotfiles/${GITHUB_HEAD_REF:-HEAD}/data/Brewfile | sed -nE 's/^mas.* ([0-9]+)/\1/gp' | tr '\n' ' ')"
echo "HOMEBREW_BUNDLE_MAS_SKIP=$HOMEBREW_BUNDLE_MAS_SKIP" | tee -a "$GITHUB_OUTPUT"
- name: Run setup with Casks
if: ${{ github.event_name == 'schedule' }}
env:
SETUP_SKIP_installDavinciResolve: true
SETUP_SKIP_loginGitHubCli: true
HOMEBREW_BUNDLE_MAS_SKIP: ${{ steps.skip.outputs.HOMEBREW_BUNDLE_MAS_SKIP }}
run: |
export SHELL="$SHELL"
zsh <(curl -sL dotup.vercel.app/${GITHUB_HEAD_REF:-HEAD}) --yes
run: zsh <(curl -sL dotup.vercel.app/${GITHUB_HEAD_REF:-HEAD}) --yes

- name: Launch New Login Shell
run: exec zsh -ilexc exit

0 comments on commit 78a80a3

Please sign in to comment.