Test Theme for Ghost #3
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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
name: Node.js CI | |
on: | |
workflow_dispatch: | |
# push: | |
# branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: write | |
pull-requests: write | |
issues: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
# node-version: [14.x, 16.x, 18.x] | |
node-version: [18.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
- run: | | |
yarn install && | |
npm install -g gulp | |
- run: yarn dev & sleep 5 && pkill -f "yarn dev" || true | |
- run: yarn test | |
# Push changes to the repo on success only using | |
- name: Update pull request with changed files if previous steps were successful | |
if: success() && github.event_name == 'pull_request' | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
# with: | |
# Optional. Commit message for the created commit. | |
# Defaults to "Apply automatic changes" | |
# commit_message: Automated Change | |
# # Optional. Local and remote branch name where commit is going to be pushed | |
# # to. Defaults to the current branch. | |
# # You might need to set `create_branch: true` if the branch does not exist. | |
# branch: feature-123 | |
# # Optional. Options used by `git-commit`. | |
# # See https://git-scm.com/docs/git-commit#_options | |
# commit_options: '--no-verify --signoff' | |
# # Optional glob pattern of files which should be added to the commit | |
# # Defaults to all (.) | |
# # See the `pathspec`-documentation for git | |
# # - https://git-scm.com/docs/git-add#Documentation/git-add.txt-ltpathspecgt82308203 | |
# # - https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec | |
# file_pattern: '*.php src/*.js tests/*.js' | |
# # Optional. Local file path to the repository. | |
# # Defaults to the root of the repository. | |
# repository: . | |
# # Optional commit user and author settings | |
# commit_user_name: My GitHub Actions Bot # defaults to "github-actions[bot]" | |
# commit_user_email: [email protected] # defaults to "41898282+github-actions[bot]@users.noreply.github.com" | |
# commit_author: Author <[email protected]> # defaults to "username <[email protected]>", where "username" belongs to the author of the commit that triggered the run | |
# # Optional. Tag name being created in the local repository and | |
# # pushed to remote repository and defined branch. | |
# tagging_message: 'v1.0.0' | |
# # Optional. Option used by `git-status` to determine if the repository is | |
# # dirty. See https://git-scm.com/docs/git-status#_options | |
# status_options: '--untracked-files=no' | |
# # Optional. Options used by `git-add`. | |
# # See https://git-scm.com/docs/git-add#_options | |
# add_options: '-u' | |
# # Optional. Options used by `git-push`. | |
# # See https://git-scm.com/docs/git-push#_options | |
# push_options: '--force' | |
# # Optional. Disable dirty check and always try to create a commit and push | |
# skip_dirty_check: true | |
# # Optional. Skip internal call to `git fetch` | |
# skip_fetch: true | |
# # Optional. Skip internal call to `git checkout` | |
# skip_checkout: true | |
# # Optional. Prevents the shell from expanding filenames. | |
# # Details: https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html | |
# disable_globbing: true | |
# # Optional. Create given branch name in local and remote repository. | |
# create_branch: true |