Home / Companies / CircleCI / Blog / July 2021

July 2021 Summaries

6 posts from CircleCI

Filter
Month: Year:
Post Summaries Back to Blog
This tutorial explores how to automate testing in Rust projects through a continuous integration pipeline using CircleCI. Highlighting Rust's performance and reliability, especially when paired with WebAssembly and Node.js, the tutorial provides a step-by-step guide to creating a simple Rust CLI application that prompts for a user's name and returns a greeting. It explains how to write and run unit tests for the application using Rust's built-in testing framework and details setting up automated tests that trigger upon code updates pushed to a GitHub repository. The tutorial concludes by encouraging users to further explore continuous deployment for Rust applications, emphasizing the increased efficiency and value Rust can bring to development teams.
Jul 29, 2021 1,048 words in the original blog post.
In a detailed guide, the text outlines the integration of the new Android Jetpack Macrobenchmark library into a CI/CD pipeline to enhance app performance testing. It emphasizes the importance of smooth app interactions and introduces the Macrobenchmark library, which tests performance in areas like app startup and scroll jank. The tutorial provides a step-by-step process for setting up the library, writing and executing macrobenchmark tests, and evaluating the results using a Node.js script to ensure performance benchmarks are not exceeded. It also details the use of Firebase Test Lab for reliable performance measurements on real devices and describes a comprehensive CircleCI workflow that combines unit tests, UI tests, instrumentation tests, and benchmarks to ensure app quality before release. The setup includes creating Google Cloud service accounts for Firebase Test Lab and storing benchmark results in Cloud Storage, with an emphasis on automating the process through CircleCI to prevent performance regressions from affecting users.
Jul 26, 2021 2,450 words in the original blog post.
This final post in a series for JavaScript developers delves into setting up Clojure microservices, focusing on unit and integration testing, as well as continuous integration (CI) using CircleCI. It highlights the convenient built-in unit testing library, clojure.test, in Clojure, which facilitates test creation by mirroring source directories in a Leiningen project structure. The post explains using the deftest macro for unit testing, mocking external dependencies with the bond/with-stub! library, and employing fixtures for setup and teardown processes similar to Jest in JavaScript. Integration tests involve a system-map for component lifecycle management, including Redis connections and HTTP servers. The article also covers using Kaocha as a test runner and setting up a CI pipeline with CircleCI, which automates tests on every commit to prevent breaking changes, utilizing Docker images for environment setup and caching to optimize build times.
Jul 25, 2021 1,652 words in the original blog post.
The text is a detailed guide on building a simple Clojure microservice, focusing on creating an HTTP server that uses a Redis data store to track the number of times an IP address has pinged a specific endpoint. The authors, Tyler Sullberg and Musa Barighzaai, describe the process of setting up the project using Leiningen, a popular Clojure project management tool, and explain its differences compared to JavaScript tools like Yarn and npm. They also introduce key Clojure concepts such as defprotocol and defrecord, which are essential for structuring microservices and implementing polymorphism. The tutorial guides readers through setting up components using the stuartsierra/component library to manage the runtime state and lifecycle of the Redis client and HTTP server. Furthermore, it covers creating routes and middleware with libraries like Ring and Compojure, emphasizing the functional programming paradigm of Clojure. The guide concludes with instructions to test the microservice and a brief mention of the next steps, which include building out testing and continuous integration for the service.
Jul 25, 2021 3,383 words in the original blog post.
The article, co-authored by Tyler Sullberg and Musa Barighzaai, discusses the challenges and nuances of using Clojure as a backend language at CircleCI, a company experiencing growth. Unlike the widely-used JavaScript, Clojure is less familiar to many developers, yet offers a unique functional programming style that emphasizes immutability and dynamic types. The article outlines the differences between Clojure and JavaScript, noting that while JavaScript allows for mutable objects and extensive use of object-oriented patterns, Clojure promotes immutable data structures and a functional approach. Clojure’s design revolves around simplifying data manipulation, and it operates on the JVM, granting access to Java libraries. The text emphasizes the importance of understanding these differences, as they impact how developers should approach building microservices in Clojure. The article is the first in a series aimed at guiding developers through setting up Clojure microservices, using JavaScript as a comparative reference, and highlights the benefits of Clojure’s REPL-driven development workflow.
Jul 22, 2021 1,467 words in the original blog post.
CircleCI's blog post discusses the challenges and solutions involved in modifying their critical systems without causing downtime, particularly focusing on permission checks that ensure authorized actions on their platform. Initially, these checks were based on GitHub’s access model, but complexities arose from using two subsystems, leading to performance issues and vulnerabilities during API outages. To address this, CircleCI undertook a careful, phased migration process, consolidating checks into a single subsystem and eliminating reliance on an expensive "user profile" cache to enhance performance and reliability. The migration was conducted in stages, with extensive logging and metrics collection to ensure that new implementations matched or exceeded the performance and reliability of the old ones. CircleCI emphasizes the importance of testing in production, highlighting strategies such as using feature toggles for quick reversion and relying on comprehensive telemetry data to build confidence in system changes. This approach allowed the team to iterate rapidly and address unforeseen issues without impacting customer experience, demonstrating the value of cautious and informed development practices.
Jul 15, 2021 1,419 words in the original blog post.