-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b6626a
commit 0610611
Showing
32 changed files
with
2,304 additions
and
145 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,75 @@ | ||
name: oci | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
env: | ||
SCCACHE_GHA_ENABLED: "true" | ||
SCCACHE_GHA_VERSION: "1" | ||
|
||
jobs: | ||
oci: | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
shell: nix develop .#oci --command bash {0} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@v13 | ||
|
||
- name: Setup Nix cache | ||
uses: DeterminateSystems/magic-nix-cache-action@v7 | ||
|
||
- name: Configure SCCache | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL); | ||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN); | ||
- name: Initialize Nix shell | ||
run: nix develop .#oci | ||
|
||
- name: Run OCI tests | ||
run: | | ||
set -eufo pipefail | ||
cd examples/oci | ||
cargo build | ||
cargo run & | ||
PID="${!}" | ||
sleep 3 | ||
oci-distribution-spec-conformance | ||
kill "${PID}" | ||
- name: Upload test results to Codecov | ||
if: always() && !cancelled() | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
files: examples/oci/junit.xml | ||
fail_ci_if_error: true | ||
token: "${{ secrets.CODECOV_TOKEN }}" | ||
|
||
- name: Upload test report to GitHub | ||
if: always() && !cancelled() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: report | ||
path: examples/oci/report.html | ||
|
||
- name: Show SCCache stats | ||
if: always() && !cancelled() | ||
run: sccache --show-stats |
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 |
---|---|---|
|
@@ -21,6 +21,10 @@ corpus | |
artifacts | ||
coverage | ||
|
||
# OCI | ||
junit.xml | ||
report.html | ||
|
||
# Nix | ||
result | ||
result-dev | ||
|
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.