# Integrate Circle CI

![](/files/-Mab1hE7kGC5q13VvtHS)

1. Tạo tài khoản Github
2. Install [git bash](https://git-scm.com/downloads)
3. setup git&#x20;

```
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
```

* Github Action is support run your code on circle CI free, blow is config:&#x20;

![](/files/-MaICcQGnNdOxj6YLTVy)

```
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Run Selenium Test
        run: mvn test -Dtestplan=todoTestPlan.xml
      - name: Publish Test Report
        uses: scacap/action-surefire-report@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./target/surefire-reports/
```

* Change open browser to headless mode

```
ublic static void launch(String name) {
    if (name.equalsIgnoreCase("chrome")) {
        WebDriverManager.chromedriver().setup();
        ChromeOptions chromeOptions = new ChromeOptions();
        chromeOptions.setHeadless(true);
        driver = new ChromeDriver(chromeOptions);
    } else if (name.equalsIgnoreCase("firefox")) {
        WebDriverManager.firefoxdriver().setup();
        driver = new FirefoxDriver();
    } else if (name.equalsIgnoreCase("ie")) {
        WebDriverManager.iedriver().setup();
        driver = new InternetExplorerDriver();
    }
    mouse = new Actions(getDriver());
    wait = new WebDriverWait(getDriver(), 30);
}
```

&#x20;

![](/files/-MaS9DQ7CxORLB-JL31T)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tvn.gitbook.io/selenium-java/circle-ci/integrate-circle-ci.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
