Skip to content

Commit 43de787

Browse files
authored
Update codeql-analysis.yml and accept appium-client v4(#32)
1 parent 802ad67 commit 43de787

File tree

2 files changed

+66
-42
lines changed

2 files changed

+66
-42
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 65 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,92 @@
1+
---
12
# For most projects, this workflow file will not need changing; you simply need
23
# to commit it to your repository.
34
#
45
# You may wish to alter this file to override the set of languages analyzed,
56
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
12-
name: "CodeQL"
7+
name: CodeQL
138

149
on:
1510
push:
16-
branches: [ main ]
11+
# Dependabot triggered push events have read-only access, but uploading code
12+
# scanning requires write access.
13+
branches-ignore:
14+
- dependabot/**
1715
pull_request:
1816
# The branches below must be a subset of the branches above
19-
branches: [ main ]
17+
branches-ignore:
18+
- dependabot/**
2019
schedule:
21-
- cron: '37 2 * * 4'
20+
- cron: '0 14 * * 6'
2221

2322
jobs:
23+
diagnostics:
24+
name: Run diagnostics
25+
runs-on: ubuntu-latest
26+
steps:
27+
# Note that a duplicate of this step must be added at the top of
28+
# each job.
29+
- id: harden-runner
30+
name: Harden the runner
31+
uses: step-security/harden-runner@v2
32+
with:
33+
egress-policy: audit
34+
- id: github-status
35+
name: Check GitHub status
36+
uses: crazy-max/ghaction-github-status@v3
37+
- id: dump-context
38+
name: Dump context
39+
uses: crazy-max/ghaction-dump-context@v2
2440
analyze:
2541
name: Analyze
42+
needs:
43+
- diagnostics
2644
runs-on: ubuntu-latest
27-
45+
permissions:
46+
# required for all workflows
47+
security-events: write
2848
strategy:
2949
fail-fast: false
3050
matrix:
31-
language: [ 'python' ]
32-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33-
# Learn more:
34-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
51+
# Override automatic language detection by changing the below list
52+
# Supported options are go, javascript, csharp, python, cpp, and java
53+
language:
54+
- python
55+
# Learn more...
56+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
3557

3658
steps:
37-
- name: Checkout repository
38-
uses: actions/checkout@v2
59+
- id: harden-runner
60+
name: Harden the runner
61+
uses: step-security/harden-runner@v2
62+
with:
63+
egress-policy: audit
64+
65+
- name: Checkout repository
66+
uses: actions/checkout@v4
3967

40-
# Initializes the CodeQL tools for scanning.
41-
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v1
43-
with:
44-
languages: ${{ matrix.language }}
45-
# If you wish to specify custom queries, you can do so here or in a config file.
46-
# By default, queries listed here will override any specified in a config file.
47-
# Prefix the list here with "+" to use these queries and those in the config file.
48-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
68+
# Initializes the CodeQL tools for scanning.
69+
- name: Initialize CodeQL
70+
uses: github/codeql-action/init@v2
71+
with:
72+
languages: ${{ matrix.language }}
4973

50-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51-
# If this step fails, then you should remove it and run the build manually (see below)
52-
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v1
74+
# Autobuild attempts to build any compiled languages (C/C++, C#, or
75+
# Java). If this step fails, then you should remove it and run the build
76+
# manually (see below).
77+
- name: Autobuild
78+
uses: github/codeql-action/autobuild@v2
5479

55-
# ℹ️ Command-line programs to run using the OS shell.
56-
# 📚 https://git.io/JvXDl
80+
# ℹ️ Command-line programs to run using the OS shell.
81+
# 📚 https://git.io/JvXDl
5782

58-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59-
# and modify them (or add more) to build your code if your project
60-
# uses a compiled language
83+
# ✏️ If the Autobuild fails above, remove it and uncomment the following
84+
# three lines and modify them (or add more) to build your code if your
85+
# project uses a compiled language
6186

62-
#- run: |
63-
# make bootstrap
64-
# make release
87+
# - run: |
88+
# make bootstrap
89+
# make release
6590

66-
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v1
91+
- name: Perform CodeQL Analysis
92+
uses: github/codeql-action/analyze@v2

stf_appium_client/AppiumServer.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ def get_api_path(self) -> str:
2828
assert self.service.is_running, 'Appium is not running'
2929
if version.startswith("1."):
3030
return f'http://127.0.0.1:{self.port}/wd/hub'
31-
elif version.startswith("2.") or version.startswith("3."):
31+
else:
3232
return f'http://127.0.0.1:{self.port}'
33-
raise AssertionError(f'appium version not supported {version}')
3433

3534
def start(self):
3635
assert not self.service.is_running, 'Appium already running'

0 commit comments

Comments
 (0)