@@ -2,28 +2,28 @@ name: Tests
22
33on :
44 push :
5- branches : [ main, dev ]
5+ branches : [main, dev]
66 paths-ignore :
7- - ' docs_src/**'
8- - ' README.md'
9- - ' CHANGELOG.md'
10- - ' CITATION'
11- - ' book.toml'
12- - ' CONTRIBUTING.md'
13- - ' .github/workflows/exe-release-prometheuspush.yml'
14- - ' *.md'
15- - ' oranda.json'
7+ - " docs_src/**"
8+ - " README.md"
9+ - " CHANGELOG.md"
10+ - " CITATION"
11+ - " book.toml"
12+ - " CONTRIBUTING.md"
13+ - " .github/workflows/exe-release-prometheuspush.yml"
14+ - " *.md"
15+ - " oranda.json"
1616 pull_request :
17- branches : [ main, dev ]
17+ branches : [main, dev]
1818 paths-ignore :
19- - ' docs_src/**'
20- - ' README.md'
21- - ' CHANGELOG.md'
22- - ' CITATION'
23- - ' book.toml'
24- - ' .github/workflows/exe-release-prometheuspush.yml'
25- - ' *.md'
26- - ' oranda.json'
19+ - " docs_src/**"
20+ - " README.md"
21+ - " CHANGELOG.md"
22+ - " CITATION"
23+ - " book.toml"
24+ - " .github/workflows/exe-release-prometheuspush.yml"
25+ - " *.md"
26+ - " oranda.json"
2727
2828env :
2929 CARGO_TERM_COLOR : always
4040 - name : Display warning and kill pipeline if needed
4141 run : |
4242 if [ ${GITHUB_BASE_REF} == "main" && ${GITHUB_HEAD_REF} != "dev" ]; then
43- echo "PR has been opened on the main branch, from another branch than dev. Please consider opening it on the dev branch instead !"
43+ echo "PR has been opened on the main branch, from another branch than dev. Please consider opening it on the dev branch instead !"
4444 exit 1
4545 fi
4646 fmt_and_clippy_linux :
6767 with :
6868 command : clippy
6969 args : -- -A clippy::upper_case_acronyms -D warnings
70-
71- fmt_and_clippy_windows :
72- name : Cargo Fmt and Clippy - Windows
73- runs-on : windows-latest
74- needs : check_pr_is_on_the_right_branch
75- steps :
76- - name : Checkout
77- uses : actions/checkout@v3
78- - name : Install Rustup
79- uses : crazy-max/ghaction-chocolatey@v2
80- with :
81- args : install rustup.install --ignore-checksums
82- - name : Install Rust toolchain
83- run : |
84- rustup toolchain install stable-x86_64-pc-windows-msvc
85- - name : Check formatting
86- uses : bpetit/action-cargo@v2.0.1
87- with :
88- command : fmt
89- args : --all -- --check
90- - name : Clippy Check
91- uses : bpetit/action-cargo@v2.0.1
92- with :
93- command : clippy
94- args : --no-default-features --features "prometheus json riemann warpten"
9570
9671 test_linux_x86_64 :
9772 name : Test on GNU/Linux x86_64 (Bare metal worker)
@@ -100,12 +75,12 @@ jobs:
10075 - name : Install dependencies (awxkit)
10176 uses : actions/setup-python@v3
10277 with :
103- python-version : ' 3.11'
78+ python-version : " 3.11"
10479 - name : Install python requirements (awxkit)
10580 run : |
10681 python -m pip install --upgrade pip
10782 pip install awxkit setuptools
108- - name : Log on AWX
83+ - name : Log on AWX
10984 id : login
11085 run : |
11186 export AWX_TOKEN=$(awx --conf.host "${{ secrets.AWX_HOST }}" --conf.username "${{ secrets.AWX_PUBLIC_USER }}" --conf.password "${{ secrets.AWX_PASSWORD }}" login | jq .token | tr -d '"')
@@ -132,12 +107,12 @@ jobs:
132107 - name : Install dependencies (awxkit)
133108 uses : actions/setup-python@v3
134109 with :
135- python-version : ' 3.11'
110+ python-version : " 3.11"
136111 - name : Install python requirements (awxkit)
137112 run : |
138113 python -m pip install --upgrade pip
139114 pip install awxkit
140- - name : Log on AWX
115+ - name : Log on AWX
141116 id : login
142117 run : |
143118 export AWX_TOKEN=$(awx --conf.host "${{ secrets.AWX_HOST }}" --conf.username "${{ secrets.AWX_PUBLIC_USER }}" --conf.password "${{ secrets.AWX_PASSWORD }}" login | jq .token | tr -d '"')
@@ -158,26 +133,3 @@ jobs:
158133 id : promtest
159134 run : |
160135 awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ secrets.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 16 --monitor
161- test_windows_x86_64 :
162- name : Test on Windows x86_64 (Virtual machine worker)
163- runs-on : " windows-latest"
164- steps :
165- - name : Checkout
166- uses : actions/checkout@v3
167- - name : Install openssl for Windows with vcpkg
168- run : |
169- echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
170- vcpkg install openssl:x64-windows-static-md
171- - name : Install Rustup
172- uses : crazy-max/ghaction-chocolatey@v2
173- with :
174- args : install rustup.install --ignore-checksums
175- - name : Install Rust toolchain
176- run : |
177- rustup toolchain install stable-x86_64-pc-windows-msvc
178- - name : Tests
179- run : |
180- cargo test --no-default-features --features "prometheus prometheuspush json riemann" exporters
181- - name : Build (debug mode)
182- run : |
183- cargo build --no-default-features --features "prometheus prometheuspush json riemann"
0 commit comments