2022-02-04 12:44:16 -05:00
|
|
|
name: "Ecosystem client tools"
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- published
|
|
|
|
|
2022-07-16 18:22:38 -05:00
|
|
|
permissions: read-all
|
|
|
|
|
2022-02-04 12:44:16 -05:00
|
|
|
jobs:
|
|
|
|
client-tools:
|
|
|
|
name: Check client tools
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-13 16:15:33 -05:00
|
|
|
- uses: actions/checkout@v3
|
2023-03-22 14:33:21 -05:00
|
|
|
- uses: actions/setup-go@v4
|
2022-02-04 12:44:16 -05:00
|
|
|
with:
|
2023-03-22 14:33:21 -05:00
|
|
|
cache: false
|
2023-04-27 02:09:46 -05:00
|
|
|
go-version: 1.20.x
|
2022-02-04 12:44:16 -05:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE
|
2023-01-18 11:24:44 -05:00
|
|
|
go install github.com/swaggo/swag/cmd/swag
|
2022-02-04 12:44:16 -05:00
|
|
|
go mod download
|
|
|
|
sudo apt-get update
|
2022-08-20 03:18:48 -05:00
|
|
|
sudo apt-get install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev pkg-config rpm uidmap
|
2022-02-04 12:44:16 -05:00
|
|
|
# install skopeo
|
2022-08-20 03:18:48 -05:00
|
|
|
git clone -b v1.9.0 https://github.com/containers/skopeo.git
|
|
|
|
cd skopeo
|
|
|
|
make bin/skopeo
|
|
|
|
sudo cp bin/skopeo /usr/bin
|
|
|
|
skopeo -v
|
2023-04-13 15:47:38 -05:00
|
|
|
# install cri-o (for crictl)
|
|
|
|
OS=xUbuntu_20.04
|
|
|
|
CRIO_VERSION=1.26
|
|
|
|
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /"|sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
|
|
|
|
echo "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/ /"|sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION.list
|
|
|
|
curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION/$OS/Release.key | sudo apt-key add -
|
|
|
|
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | sudo apt-key add -
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install -y cri-o cri-o-runc
|
|
|
|
sudo systemctl enable crio.service
|
|
|
|
sudo systemctl start crio.service
|
|
|
|
sudo chmod 0777 /var/run/crio/crio.sock
|
2023-03-10 13:37:29 -05:00
|
|
|
- name: Run referrers tests
|
|
|
|
run: |
|
|
|
|
make test-bats-referrers
|
2023-04-24 13:13:15 -05:00
|
|
|
- name: Run metadata tests
|
|
|
|
run: |
|
|
|
|
make test-bats-metadata
|
2022-02-04 12:44:16 -05:00
|
|
|
- name: Run push-pull tests
|
|
|
|
run: |
|
2022-10-18 22:47:41 -05:00
|
|
|
make test-push-pull
|
2022-04-27 01:00:20 -05:00
|
|
|
- name: Run metrics tests
|
|
|
|
run: |
|
2022-10-18 22:47:41 -05:00
|
|
|
make test-bats-metrics
|
2022-04-27 01:00:20 -05:00
|
|
|
- name: Run cve tests
|
|
|
|
run: |
|
2022-10-18 22:47:41 -05:00
|
|
|
make test-bats-cve
|
2022-04-27 01:00:20 -05:00
|
|
|
- name: Run sync test
|
|
|
|
run: |
|
2022-10-18 22:47:41 -05:00
|
|
|
make test-bats-sync
|
2022-04-27 01:00:20 -05:00
|
|
|
- name: Run scrub tests
|
|
|
|
run: |
|
2022-10-18 22:47:41 -05:00
|
|
|
make test-bats-scrub
|
2022-07-14 10:13:46 -05:00
|
|
|
- name: Run anonymous-push-pull tests
|
|
|
|
run: |
|
2022-10-18 22:47:41 -05:00
|
|
|
make test-anonymous-push-pull
|
|
|
|
- name: Run annotations tests
|
|
|
|
run: |
|
|
|
|
make test-annotations
|
2022-11-22 13:29:57 -05:00
|
|
|
- name: Install localstack
|
|
|
|
run: |
|
|
|
|
pip install --upgrade pyopenssl
|
|
|
|
pip install localstack awscli-local[ver1] # install LocalStack cli and awslocal
|
|
|
|
docker pull localstack/localstack # Make sure to pull the latest version of the image
|
|
|
|
localstack start -d # Start LocalStack in the background
|
|
|
|
|
|
|
|
echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container
|
|
|
|
localstack wait -t 30 # to become ready before timing out
|
|
|
|
echo "Startup complete"
|
|
|
|
- name: Run cloud-only tests
|
|
|
|
run: |
|
|
|
|
make test-cloud-only
|
|
|
|
env:
|
|
|
|
AWS_ACCESS_KEY_ID: fake
|
|
|
|
AWS_SECRET_ACCESS_KEY: fake
|