-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into parallel-conflict-search
- Loading branch information
Showing
25 changed files
with
1,639 additions
and
641 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Pro Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
schedule: | ||
- cron: "0 0 */2 * *" | ||
workflow_run: | ||
workflows: ["CLA check"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
real-archive-tests: | ||
name: Real Archive Tests | ||
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} | ||
# Do not change to newer releases as "fips" may not be available there. | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Run real archive tests | ||
env: | ||
PRO_TOKEN: ${{ secrets.PRO_TOKEN }} | ||
run: | | ||
set -ex | ||
detach() { | ||
sudo pro detach --assume-yes || true | ||
sudo rm -f /etc/apt/auth.conf.d/90ubuntu-advantage | ||
} | ||
trap detach EXIT | ||
# Attach pro token and enable services | ||
sudo pro attach ${PRO_TOKEN} --no-auto-enable | ||
# Cannot enable fips and fips-updates at the same time. | ||
# Hack: enable fips, copy the credentials and then after enabling | ||
# other services, add the credentials back. | ||
sudo pro enable fips --assume-yes | ||
sudo cp /etc/apt/auth.conf.d/90ubuntu-advantage /etc/apt/auth.conf.d/90ubuntu-advantage.fips-creds | ||
# This will disable the fips service. | ||
sudo pro enable fips-updates esm-apps esm-infra --assume-yes | ||
# Add the fips credentials back. | ||
sudo sh -c 'cat /etc/apt/auth.conf.d/90ubuntu-advantage.fips-creds >> /etc/apt/auth.conf.d/90ubuntu-advantage' | ||
sudo rm /etc/apt/auth.conf.d/90ubuntu-advantage.fips-creds | ||
# Make apt credentials accessible to USER. | ||
sudo setfacl -m u:$USER:r /etc/apt/auth.conf.d/90ubuntu-advantage | ||
# Run tests on Pro real archives. | ||
go test ./internal/archive/ --real-pro-archive | ||
spread-tests: | ||
name: Spread tests | ||
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
repository: snapcore/spread | ||
path: _spread | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '>=1.17.0' | ||
|
||
- name: Build and run spread | ||
env: | ||
PRO_TOKEN: ${{ secrets.PRO_TOKEN }} | ||
run: | | ||
(cd _spread/cmd/spread && go build) | ||
_spread/cmd/spread/spread -v tests/pro-archives |
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
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
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
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
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
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
Oops, something went wrong.