Skip to content

💚 fix ci

💚 fix ci #221

Workflow file for this run

name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
paths-ignore:
- 'docs/**'
pull_request:
branches: [ "main" ]
paths-ignore:
- 'docs/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Default to bash
defaults:
run:
shell: bash -o errexit -o nounset -o pipefail -x {0}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
self-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
# Runs our tests
- name: Run valet self test
env:
VALET_CONFIG_ENABLE_COLORS: true
VALET_CONFIG_DISABLE_PROGRESS: true
run: |
chmod +x valet
./valet self test -C
self-install-test:
# We run this job in a container to avoid polluting the host
runs-on: ubuntu-latest
container: ubuntu:latest
steps:
# Install dependencies
- name: Run valet self install && self update && self extend
env:
VALET_CONFIG_ENABLE_COLORS: true
VALET_CONFIG_DISABLE_PROGRESS: true
RUNNING_IN_DOCKER: true
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
run: |
# Install dependencies
apt-get update -qq
apt-get install -qq -y curl sudo makepasswd uidmap git 1>/dev/null
# Create the 'me' user with sudo privileges
echo 'me' > /tmp/pw
useradd -m -u 1987 -U -p "$(makepasswd --crypt-md5 --clearfrom=/tmp/pw)" me
echo "me ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers.d/me-sudo
# checkout the repository
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
# Runs our tests
- name: Run valet self install && self update && self extend
env:
VALET_CONFIG_ENABLE_COLORS: true
VALET_CONFIG_DISABLE_PROGRESS: true
RUNNING_IN_DOCKER: true
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
run: |
chmod +x ./tests.d/1106-self-install/test
./tests.d/1106-self-install/test