Skip to content

Commit

Permalink
chore: Migrate from Travis CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
elpete committed Apr 8, 2021
1 parent 6cce921 commit 28dc4c5
Show file tree
Hide file tree
Showing 5 changed files with 246 additions and 28 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/cron.yml
@@ -0,0 +1,35 @@
on:
schedule:
- cron: 0 0 * * 1

jobs:
tests:
runs-on: ubuntu-latest
name: Tests
strategy:
fail-fast: false
matrix:
cfengine: ["lucee@5", "lucee@be", "adobe@2016", "adobe@2018", "adobe@be"]
coldbox: ["coldbox@5", "coldbox@6", "coldbox@be"]
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Java JDK
uses: actions/setup-java@v1.4.3
with:
java-version: 11

- name: Set Up CommandBox
uses: elpete/setup-commandbox@v1.0.0

- name: Install dependencies
run: |
box install
box install ${{ matrix.coldbox }} --noSave
- name: Start server
run: box server start cfengine=${{ matrix.cfengine }} --noSaveSettings

- name: Run TestBox Tests
run: box testbox run
71 changes: 71 additions & 0 deletions .github/workflows/pr.yml
@@ -0,0 +1,71 @@
on:
push:
branches-ignore:
- "main"
- "master"
- "development"
pull_request:
branches:
- main
- master
- development

jobs:
tests:
runs-on: ubuntu-latest
name: Tests
strategy:
fail-fast: true
matrix:
cfengine: ["lucee@5", "adobe@2016", "adobe@2018"]
coldbox: ["coldbox@5", "coldbox@6"]
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Java JDK
uses: actions/setup-java@v1.4.3
with:
java-version: 11

- name: Set Up CommandBox
uses: elpete/setup-commandbox@v1.0.0

- name: Install dependencies
run: |
box install
box install ${{ matrix.coldbox }} --noSave
- name: Start server
run: box server start cfengine=${{ matrix.cfengine }} --noSaveSettings

- name: Run TestBox Tests
run: box testbox run

format:
runs-on: ubuntu-latest
name: Format
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java JDK
uses: actions/setup-java@v1.4.3
with:
java-version: 11

- name: Set Up CommandBox
uses: elpete/setup-commandbox@v1.0.0

- name: Install CFFormat
run: box install commandbox-cfformat

- name: Run CFFormat
run: box run-script format

- name: Commit Format Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply cfformat changes
69 changes: 69 additions & 0 deletions .github/workflows/prerelease.yml
@@ -0,0 +1,69 @@
on:
push:
branches:
- development

jobs:
tests:
name: Tests
if: "!contains(github.event.head_commit.message, '__SEMANTIC RELEASE VERSION UPDATE__')"
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
cfengine: ["lucee@5", "adobe@2016", "adobe@2018"]
coldbox: ["coldbox@5", "coldbox@6"]
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Java JDK
uses: actions/setup-java@v1.4.3
with:
java-version: 11

- name: Set Up CommandBox
uses: elpete/setup-commandbox@v1.0.0

- name: Install dependencies
run: |
box install
box install ${{ matrix.coldbox }} --noSave
- name: Start server
run: box server start cfengine=${{ matrix.cfengine }} --noSaveSettings

- name: Run TestBox Tests
run: box testbox run

release:
name: Semantic Release
if: "!contains(github.event.head_commit.message, '__SEMANTIC RELEASE VERSION UPDATE__')"
needs: tests
runs-on: ubuntu-latest
env:
GA_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java JDK
uses: actions/setup-java@v1.4.3
with:
java-version: 11

- name: Set Up CommandBox
uses: elpete/setup-commandbox@v1.0.0

- name: Install and Configure Semantic Release
run: |
box install commandbox-semantic-release
box config set endpoints.forgebox.APIToken=${{ secrets.FORGEBOX_TOKEN }}
box config set modules.commandbox-semantic-release.plugins='{ "VerifyConditions": "GitHubActionsConditionsVerifier@commandbox-semantic-release", "FetchLastRelease": "ForgeBoxReleaseFetcher@commandbox-semantic-release", "RetrieveCommits": "JGitCommitsRetriever@commandbox-semantic-release", "ParseCommit": "ConventionalChangelogParser@commandbox-semantic-release", "FilterCommits": "DefaultCommitFilterer@commandbox-semantic-release", "AnalyzeCommits": "DefaultCommitAnalyzer@commandbox-semantic-release", "VerifyRelease": "NullReleaseVerifier@commandbox-semantic-release", "GenerateNotes": "GitHubMarkdownNotesGenerator@commandbox-semantic-release", "UpdateChangelog": "FileAppendChangelogUpdater@commandbox-semantic-release", "CommitArtifacts": "NullArtifactsCommitter@commandbox-semantic-release", "PublishRelease": "ForgeBoxReleasePublisher@commandbox-semantic-release", "PublicizeRelease": "GitHubReleasePublicizer@commandbox-semantic-release" }'
# - name: Run Semantic Release
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: box semantic-release --prerelease
71 changes: 71 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,71 @@
on:
push:
branches:
- main
- master

jobs:
tests:
name: Tests
if: "!contains(github.event.head_commit.message, '__SEMANTIC RELEASE VERSION UPDATE__')"
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
cfengine: ["lucee@5", "adobe@2016", "adobe@2018"]
coldbox: ["coldbox@5", "coldbox@6"]
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup Java JDK
uses: actions/setup-java@v1.4.3
with:
java-version: 11

- name: Set Up CommandBox
uses: elpete/setup-commandbox@v1.0.0

- name: Install dependencies
run: |
box install
box install ${{ matrix.coldbox }} --noSave
- name: Start server
run: box server start cfengine=${{ matrix.cfengine }} --noSaveSettings

- name: Run TestBox Tests
run: box testbox run

release:
name: Semantic Release
if: "!contains(github.event.head_commit.message, '__SEMANTIC RELEASE VERSION UPDATE__')"
needs: tests
runs-on: ubuntu-latest
env:
GA_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java JDK
uses: actions/setup-java@v1.4.3
with:
java-version: 11

- name: Set Up CommandBox
uses: elpete/setup-commandbox@v1.0.0

- name: Install and Configure Semantic Release
run: |
box install commandbox-semantic-release
box config set endpoints.forgebox.APIToken=${{ secrets.FORGEBOX_TOKEN }}
box config set modules.commandbox-semantic-release.targetBranch=main
box config set modules.commandbox-semantic-release.plugins='{ "VerifyConditions": "GitHubActionsConditionsVerifier@commandbox-semantic-release", "FetchLastRelease": "ForgeBoxReleaseFetcher@commandbox-semantic-release", "RetrieveCommits": "JGitCommitsRetriever@commandbox-semantic-release", "ParseCommit": "ConventionalChangelogParser@commandbox-semantic-release", "FilterCommits": "DefaultCommitFilterer@commandbox-semantic-release", "AnalyzeCommits": "DefaultCommitAnalyzer@commandbox-semantic-release", "VerifyRelease": "NullReleaseVerifier@commandbox-semantic-release", "GenerateNotes": "GitHubMarkdownNotesGenerator@commandbox-semantic-release", "UpdateChangelog": "FileAppendChangelogUpdater@commandbox-semantic-release", "CommitArtifacts": "NullArtifactsCommitter@commandbox-semantic-release", "PublishRelease": "ForgeBoxReleasePublisher@commandbox-semantic-release", "PublicizeRelease": "GitHubReleasePublicizer@commandbox-semantic-release" }'
- name: Run Semantic Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: box semantic-release
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

0 comments on commit 28dc4c5

Please sign in to comment.