forked from rancher/rancher
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (52 loc) · 1.87 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
41
42
43
44
45
46
47
48
49
50
51
52
name: Validate
on: [pull_request, push]
jobs:
validate:
if: false
runs-on: test-runner-1
container: ubuntu:22.04
env:
GOLANG_CI_LINT_VERSION: v1.54.2
PYTHON_VERSION: '3.11'
GOLANG_VERSION: '1.22'
steps:
- name: Install tools
run: |
export TZ=Asia/Kolkata
export DEBIAN_FRONTEND=noninteractive
apt update && apt install -y --no-install-recommends unzip curl sudo ca-certificates git-all
git config --global --add safe.directory '/__w/rancher/rancher'
- 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 golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin "v1.59.0"
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/spectrometer/master/install.sh | sh
- 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