forked from rancher/rancher
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 1.22 KB
/
validate.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
name: Validate
on: [pull_request, push]
jobs:
validate:
runs-on: ubuntu-latest
env:
GOLANG_CI_LINT_VERSION: v1.54.2
PYTHON_VERSION: '3.11'
GOLANG_VERSION: '1.22'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Uninstall existing Python versions
run: |
sudo apt-get remove -y python3
sudo apt-get autoremove -y
sudo apt-get purge -y python3
sudo apt-get clean
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "${{ env.PYTHON_VERSION }}"
- name: Check Python version
run: |
sudo rm -rf /usr/bin/python3
sudo cp $(which python3) /usr/bin/python3
python3 --version
python3 -m ensurepip --upgrade
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "${{ env.GOLANG_VERSION }}"
- name: Install Python and dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-pip python3-dev libffi-dev libssl-dev
sudo pip3 install --upgrade pip
sudo pip3 install tox flake8
- name: Validate
run: ./scripts/validate