Add uv to $PATH #57
This file contains hidden or 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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the codebase | |
| uses: actions/checkout@v3 | |
| - name: Run yamllint | |
| uses: karancode/yamllint-github-action@master | |
| - name: Run ansible-lint | |
| uses: ansible-community/ansible-lint-action@main | |
| test: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: | |
| - macos-12 | |
| - macos-11 | |
| steps: | |
| - name: Check out the codebase | |
| uses: actions/checkout@v3 | |
| - name: Uninstall GitHub Actions' built-in Homebrew | |
| run: | | |
| curl -sLO https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh | |
| chmod +x ./uninstall.sh | |
| sudo ./uninstall.sh --force | |
| sudo rm -rf /usr/local/Homebrew /usr/local/Caskroom /usr/local/bin/brew | |
| - name: Uninstall GitHub Actions' built-in browser installs. | |
| run: | | |
| sudo rm -rf /Applications/Firefox.app | |
| sudo rm -rf /Applications/Google\ Chrome.app | |
| - name: Install Ansible using pip | |
| run: | | |
| sudo pip3 install --upgrade pip | |
| pip3 install ansible | |
| - name: Update PATH env | |
| run: | | |
| pythonversion=$(ls ~/Library/Python) | |
| echo "${HOME}/Library/Python/${pythonversion}/bin" >> $GITHUB_PATH | |
| - name: Install Ansible roles and collections | |
| run: ansible-galaxy install -r requirements.yml | |
| - name: Remove Docker from brew role defaults | |
| run: sed -ie '/docker/d' ./config.defaults.yml | |
| - name: Remove gitconfig dotfile | |
| run: rm ./files/dotfiles/gitconfig | |
| - name: Test the playbook's syntax | |
| run: ansible-playbook dotfiles.yml --skip-tags "mas,docker" --syntax-check | |
| - name: Test the playbook | |
| run: ansible-playbook dotfiles.yml --skip-tags "mas,docker" | |
| env: | |
| ANSIBLE_FORCE_COLOR: '1' | |
| - name: Idempotence check | |
| run: | | |
| idempotence=$(mktemp) | |
| ansible-playbook dotfiles.yml --skip-tags "mas,docker" | tee -a ${idempotence} | |
| tail ${idempotence} | grep -q 'changed=0.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) | |
| env: | |
| ANSIBLE_FORCE_COLOR: '1' |