diff --git a/.github/workflows/health-check.yml b/.github/workflows/health-check.yml index e21016a..7aff2d4 100644 --- a/.github/workflows/health-check.yml +++ b/.github/workflows/health-check.yml @@ -18,3 +18,47 @@ jobs: uses: gitleaks/gitleaks-action@v2 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + + Tests: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + include: + - os: macOS-latest + shell: bash + - os: ubuntu-latest + shell: bash + runs-on: ${{ matrix.os }} + defaults: + run: + shell: ${{ matrix.shell }} + steps: + - name: Clean up linuxOS + if: runner.os != 'macOS' + run: sudo apt-get install build-essential + + - name: Cleanup macOS + if: runner.os == 'macOS' + run: | + sudo rm -rf /Applications/Xcode.app \ + /Library/Developer/CommandLineTools + sudo xcode-select --reset + + - name: Install Homebrew + run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" + env: + NONINTERACTIVE: 1 + + - name: Set up Homebrew PATH + run: | + if [[ "${{ runner.os }}" = "macOS" ]] + then + echo "/usr/local/bin:/usr/bin:/bin" >> "${GITHUB_PATH}" + else + echo "/home/linuxbrew/.linuxbrew/bin:/usr/bin:/bin" >> "${GITHUB_PATH}" + fi + + - name: Run install script + run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/YasminTeles/dotfiles/HEAD/install.sh)" + env: + CI: true diff --git a/install.sh b/install.sh index 03b9015..b36c2bd 100644 --- a/install.sh +++ b/install.sh @@ -11,8 +11,12 @@ function step_msg { } # -- Get some information ----------------------------------------------------- -printf "Please enter some information.\n" -read -p "What is your email? " GIT_EMAIL +if [ "$CI" = true ] ; then + GIT_EMAIL=name@mail.com +else + printf "Please enter some information.\n" + read -p "What is your email? " GIT_EMAIL +fi printf "\nPlease wait! It will configure your environment.\n"