Fix lazy promise transitions #474
Workflow file for this run
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
name: CICD | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
checks: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Check Nixpkgs input | |
uses: DeterminateSystems/flake-checker-action@v5 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v10 | |
# basic check to verify that all Nix flake outputs are soundly typed | |
- name: Check flake | |
run: | | |
nix flake check \ | |
--all-systems \ | |
--no-build | |
# If running `gomod2nix` changes `gomod2nix.toml`, that means that the | |
# file is not up to date and the build needs to fail. If that happens, | |
# run `gomod2nix` inside the Nix development environment to regenerate | |
# that file and then commit the changes to Git. | |
- name: Ensure gomod2nix dependencies are up to date | |
run: | | |
nix develop --command gomod2nix | |
git diff --exit-code gomod2nix.toml | |
- name: Run golangci-lint | |
run: | | |
nix develop --command \ | |
golangci-lint run \ | |
--verbose \ | |
--timeout=3m | |
- name: Run go test and generate coverage report | |
run: | | |
nix develop --command \ | |
go test \ | |
-v \ | |
-coverprofile=coverage.out \ | |
-coverpkg=./... \ | |
./... | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v4 # nosemgrep | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
codecov_yml_path: codecov.yml | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v10 | |
- name: Use Magic Nix Cache | |
uses: DeterminateSystems/magic-nix-cache-action@v4 | |
- name: Build server and harness | |
run: | | |
nix build ".#resonate" | |
cp ./result/bin/resonate resonate | |
nix build ".#durable-promise-test-harness" | |
cp ./result/bin/durable-promise-test-harness durable-promise-test-harness | |
- name: Run resonate server | |
run: | | |
./resonate serve --aio-store-sqlite-path :memory: & | |
- name: Run linearizability check | |
run: | | |
./durable-promise-test-harness verify -r 1000 -c 10 | |
- uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: test-harness-results | |
path: test/results/ | |
scan: | |
name: semgrep | |
runs-on: ubuntu-20.04 | |
needs: [test] | |
env: | |
SEMGREP_RULES: "auto semgrep.yml" | |
if: (github.actor != 'dependabot[bot]') | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v10 | |
- name: Use Magic Nix Cache | |
uses: DeterminateSystems/magic-nix-cache-action@v4 | |
- name: semgrep | |
run: | | |
nix develop --command \ | |
semgrep ci |