Skip to content

Commit 5cb9c4b

Browse files
authored
Create copilot-setup-steps.yml
1 parent 57cd966 commit 5cb9c4b

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: "Copilot Setup Steps"
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
14+
jobs:
15+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
16+
copilot-setup-steps:
17+
runs-on: ubuntu-latest
18+
19+
# Set the permissions to the lowest permissions possible needed for your steps.
20+
# Copilot will be given its own token for its operations.
21+
permissions:
22+
# If you want to clone the repository as part of your setup steps, for example to install dependencies,
23+
# you'll need the `contents: read` permission. If you don't clone the repository in your setup steps,
24+
# Copilot will do this for you automatically after the steps complete.
25+
contents: read
26+
27+
# You can define any steps you want, and they will run before the agent starts.
28+
# If you do not check out your code, Copilot will do this for you.
29+
steps:
30+
31+
- name: Harden Runner
32+
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
33+
with:
34+
egress-policy: audit
35+
36+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
with:
38+
submodules: true
39+
# we need full history with tags for the version number
40+
fetch-depth: '0'
41+
42+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
43+
with:
44+
cache-dependency-path: |
45+
pyproject.toml
46+
requirements.txt
47+
48+
- name: upgrade pip setuptools wheel
49+
run: python -m pip install --upgrade pip setuptools wheel
50+
shell: bash
51+
52+
- name: install qcodes editable
53+
run: |
54+
pip install -e .[test] -c requirements.txt
55+
echo "PYTEST_OPT=" >> $GITHUB_ENV
56+
57+
- name: Get Pyright Version
58+
id: pyright-version
59+
run: |
60+
PYRIGHT_VERSION=$(jq -r '.devDependencies.pyright' < package.json)
61+
echo $PYRIGHT_VERSION
62+
echo "version=$PYRIGHT_VERSION" >> $GITHUB_OUTPUT
63+
working-directory: .github
64+
shell: bash

0 commit comments

Comments
 (0)