DEV Community

Avelyn Hyunjeong Choi
Avelyn Hyunjeong Choi

Posted on

3

Add GitHub Actions CI workflows

Issue

  • Add a GitHub Actions workflow to run the test script on each push and pull request.
  • Issue

Process

Added a .github/workflows/ci.yml file for creating a GitHub Actions CI workflow as below.

name: CI

on:
    pull_request:
    push:

jobs:
    test:
        name: Run Tests
        runs-on: ubuntu-latest
        steps:
            - name: Checkout code
              uses: actions/checkout@v3

            - name: Setup Node.js
              uses: actions/setup-node@v3
              with:
                  node-version-file: .nvmrc
                  cache: npm

            - name: Install dependencies
              run: npm ci

            - name: Run tests
              run: npm test
Enter fullscreen mode Exit fullscreen mode

Outcome

outcome

What I Learned

This week at school, I learned new skills in setting up Continuous Integration (CI) pipelines. It presented an great opportunity to apply this knowledge where it was needed. In particular, I worked on the ci.yml file, maintaining a consistent structure while accommodating specific requests from the repo owner. For example, the owner wanted the CI workflow to run on all pull requests and pushes, not just on the main branch. Therefore, I removed the branch restriction. Another adjustment involved splitting the process into two steps: one for installing dependencies and the other for running tests.

Progress from release 0.2

This PR was my first attempt at creating a pull request from scratch. Unlike other PRs I've worked on, this one lacked an existing codebase for the CI workflows. So, it could have been a more challenging task. Fortunately, my recent learning of CI pipeline concepts made the process feel familiar, as the knowledge was still fresh in my memory. As a result, achieving the same goal for a different repository wasn't as challenging as I initially thought.

My previous PRs in release 0.2

  • pr1 identified all the broken links on the website and fixed them (same repo as the current PR).
  • pr2 added Korean translation for the about page in Telescope project.
  • pr3 added a new functionality to convert .markdown to .html.
  • pr4 auto-rectified git source url using regex.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more