Prepare v0.40.0 #470
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: push | |
concurrency: | |
group: registries-tests | |
name: Build on push | |
jobs: | |
tests-integration: | |
name: Integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19.x | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: setup-docker | |
uses: docker-practice/actions-setup-docker@master | |
# - name: Login to quay | |
# run: echo ${{ secrets.DOCKER_TESTING_PASSWORD }} | sudo -E docker login -u ${{ secrets.DOCKER_TESTING_USERNAME }} --password-stdin quay.io | |
- name: Install deps | |
run: | | |
sudo apt-get install -y upx && sudo -E env "PATH=$PATH" make deps | |
sudo curl -fSL "https://github.com/genuinetools/img/releases/download/v0.5.11/img-linux-amd64" -o "/usr/bin/img" | |
sudo chmod a+x "/usr/bin/img" | |
- name: Login to quay with img | |
run: echo ${{ secrets.DOCKER_TESTING_PASSWORD }} | sudo img login -u ${{ secrets.DOCKER_TESTING_USERNAME }} --password-stdin quay.io | |
- name: Tests with Dockerv3 backend | |
run: | | |
sudo -E env "PATH=$PATH" \ | |
env "LUET_BACKEND=dockerv3" \ | |
make test-integration | |
- name: Tests with Dockerv2 backend | |
run: | | |
sudo -E env "PATH=$PATH" \ | |
env "LUET_BACKEND=dockerv2" \ | |
make test-integration | |
- name: Tests | |
run: | | |
sudo -E \ | |
env "PATH=$PATH" \ | |
env "TEST_DOCKER_IMAGE=${{ secrets.DOCKER_TESTING_IMAGE }}" \ | |
env "UNIT_TEST_DOCKER_IMAGE=${{ secrets.DOCKER_TESTING_IMAGE }}" \ | |
env "UNIT_TEST_DOCKER_IMAGE_REPOSITORY=${{ secrets.DOCKER_TESTING_UNIT_TEST_IMAGE }}" \ | |
make test-integration | |
tests-unit: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19.x | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install deps | |
run: | | |
sudo apt-get install -y upx && | |
sudo curl -fSL "https://github.com/genuinetools/img/releases/download/v0.5.11/img-linux-amd64" -o "/usr/bin/img" | |
sudo chmod a+x "/usr/bin/img" | |
make deps | |
make build | |
sudo cp -rf luet /usr/bin/luet | |
- name: Install GoReleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
distribution: goreleaser | |
version: latest | |
install-only: true | |
- name: Show GoReleaser version | |
run: goreleaser -v | |
- name: setup-docker | |
uses: docker-practice/actions-setup-docker@master | |
#- name: Login to quay | |
# run: echo ${{ secrets.DOCKER_TESTING_PASSWORD }} | sudo -E docker login -u ${{ secrets.DOCKER_TESTING_USERNAME }} --password-stdin quay.io | |
- name: Build test | |
run: sudo -E env "PATH=$PATH" make multiarch-build-small | |
- name: Tests | |
run: | | |
sudo -E \ | |
env "PATH=$PATH:$GOPATH/bin" \ | |
env "TEST_DOCKER_IMAGE=${{ secrets.DOCKER_TESTING_IMAGE }}" \ | |
env "UNIT_TEST_DOCKER_IMAGE=${{ secrets.DOCKER_TESTING_IMAGE }}" \ | |
env "UNIT_TEST_DOCKER_IMAGE_REPOSITORY=${{ secrets.DOCKER_TESTING_UNIT_TEST_IMAGE }}" \ | |
make test-coverage |