generated from gfurtadoalmeida/esp32-project-template
-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (42 loc) · 1.22 KB
/
development.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: development
on:
push:
branches: ["master"]
paths:
- 'components/**'
- 'main/**'
- 'test/**'
pull_request:
types:
- opened
- edited
- synchronize
- reopened
paths:
- 'components/**'
- 'main/**'
- 'test/**'
workflow_dispatch:
env:
ESP_DOCKER_IMAGE: gfurtadoalmeida/esp32-docker-sonar:v5.1
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Docker Login
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_TOKEN}}
- name: Pull ESP-IDF Image
shell: pwsh
run: docker pull ${{env.ESP_DOCKER_IMAGE}}
- name: Build with Sonar
shell: pwsh
run: docker run --rm --env SONARCLOUD_ORGANIZATION=${{secrets.SONARCLOUD_ORGANIZATION}} --env SONARCLOUD_TOKEN=${{secrets.SONARCLOUD_TOKEN}} --env LC_ALL='C.UTF-8' -v ${{github.workspace}}:/project -w /project ${{env.ESP_DOCKER_IMAGE}} idf.py build
- name: Build Test
shell: pwsh
run: docker run --rm --env LC_ALL='C.UTF-8' -v ${{github.workspace}}:/project -w /project ${{env.ESP_DOCKER_IMAGE}} idf.py -C ./test build