NXT-12459: Replace Travis CI with GitHub Actions#864
Open
hong6316 wants to merge 1 commit into
Open
Conversation
Comment on lines
+18
to
+21
| uses: ./.github/workflows/ci-reusable.yml | ||
| with: | ||
| checkout-ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
| secrets: inherit |
Comment on lines
+13
to
+16
| uses: ./.github/workflows/ci-reusable.yml | ||
| with: | ||
| checkout-ref: '' | ||
| secrets: inherit |
Comment on lines
+14
to
+75
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: ['lts/*', 'node'] | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ inputs.checkout-ref || github.ref }} | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Install system dependencies | ||
| run: | | ||
| curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-4.4.gpg --dearmor | ||
| echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list | ||
| sudo apt-get update | ||
| sudo apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev | ||
|
|
||
| - name: Clone and setup Enact CLI | ||
| run: | | ||
| git clone --branch=develop --depth 1 https://github.com/enactjs/cli ../cli | ||
| pushd ../cli | ||
| npm install | ||
| npm link | ||
| popd | ||
|
|
||
| - name: Clone and setup Enact framework | ||
| run: | | ||
| git clone --branch=develop --depth 1 https://github.com/enactjs/enact ../enact | ||
| pushd ../enact | ||
| npm install | ||
| npm run lerna exec -- --ignore enact-sampler --concurrency 1 -- npm --no-package-lock install | ||
| npm run lerna exec -- --ignore enact-sampler --concurrency 1 -- npm --no-package-lock link | ||
| npm run interlink | ||
| popd | ||
|
|
||
| - name: Install project dependencies | ||
| run: | | ||
| rm -fr node_modules/@enact | ||
| npm install | ||
| enact link | ||
|
|
||
| - name: Run tests with coverage | ||
| run: npm test -- --runInBand --coverage | ||
|
|
||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| fail_ci_if_error: false | ||
|
|
||
| - name: Run ESLint | ||
| run: npm run lint -- -- --report-unused-disable-directives --max-warnings 0 . | ||
|
|
||
| - name: Validate documentation | ||
| run: npm run validate-docs |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #864 +/- ##
========================================
Coverage 85.06% 85.06%
========================================
Files 118 118
Lines 4493 4493
Branches 1226 1225 -1
========================================
Hits 3822 3822
Misses 518 518
Partials 153 153 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Issue Resolved / Feature Added
Replace Travis CI with GitHub Actions for the CI pipeline. Travis CI configuration (
.travis.yml) is removed and replaced with GitHub Actions workflows under.github/workflows/.Resolution
Three workflow files are introduced:
ci-reusable.yml— A reusable workflow that contains the full CI pipeline: checkout, Node.js setup (lts/* and node), system dependency installation, Enact CLI clone & link,npm install, bootstrap, interlink, tests with coverage, Codecov upload, ESLint, docs validation, and sampler build.ci-branch.yml— Triggers on pull requests and uses the reusable workflow, checking out the PR head SHA directly.ci-pull-request.yml— Triggers on pull requests and uses the reusable workflow with the default merge commit.All CI steps from the original
.travis.ymlare preserved in the new GitHub Actions pipeline.Additional Considerations
codecov/codecov-action@v5with a repository secret (CODECOV_TOKEN) instead of thecodecovnpm package.fail_ci_if_erroris set tofalsefor the Codecov step to avoid blocking CI on upload failures.@v4,@v5) are floating major version tags, not pinned to a specific release. They automatically track the latest patch/minor within the major version, which is the standard recommended practice for GitHub Actions.Links
Comments
Enact-DCO-1.0-Signed-off-by: Taeyoung Hong (taeyoung.hong@lge.com)