Updates github workflows. #8
This file contains 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: Test | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
# Initialize the env variables. These get set after the repo is checked out | |
# because they depend on files in the repo. | |
env: | |
NODE_VERSION: '' | |
GIT_USER_NAME: '' | |
GIT_USER_EMAIL: '' | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it. | |
- name: Checkout Repo | |
id: checkout_repo | |
uses: actions/checkout@v4 | |
# Sets the environment variables from the env.sh script. | |
- name: Set Environment Variables | |
id: set_env_vars | |
run: .github/workflows/scripts/env.sh | |
# Setup Node. | |
- name: Setup Node | |
id: setup_node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
# Config a dummy git user for use in the repo initialization. | |
- name: Config Git User | |
id: config_git_user | |
run: | | |
git config --global user.name ${{ env.GIT_USER_NAME }} | |
git config --global user.email ${{ env.GIT_USER_EMAIL }} | |
# Installs npm and composer dependencies. | |
- name: Install | |
id: install | |
run: npm ci | |
# Lint all files. | |
- name: Lint | |
id: lint | |
run: npm run lint | |
# Runs a test theme creation with all options set to skip prompt. Note we also set | |
# the path to `tests` and enable the `verbose` option for debugging. | |
- name: Create Theme | |
id: create_theme | |
run: npm test test-theme -- -v -p "tests" -N "Test Theme" -X "1.0.0" -T "parent-theme" -U "https://github.com/dreamsicle-io/test" -B "https://github.com/dreamsicle-io/test/issues" -R "git@github.com:dreamsicle-io/test.git" -r "git" -d "Just another WordPress theme." -A "Dreamsicle" -E "hello@dreamsicle.io" -u "https://www.dreamsicle.io" -L "gpl-3.0" -t "accessibility-ready,translation-ready" -W "6.1.0" -w "6.4.0" -F "test" -C "Test" -c "TEST" |