This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Showing
95 changed files
with
11,238 additions
and
1,064 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,77 @@ | ||
name: Run tests | ||
on: | ||
schedule: | ||
- cron: "0 8 * * *" | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: {} | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PULUMI_TEST_OWNER: "moolumi" | ||
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | ||
AWS_REGION: "us-west-2" | ||
PULUMI_API: https://api.pulumi-staging.io | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
matrix: | ||
platform: | ||
- ubuntu-latest | ||
go-version: | ||
- 1.18.x | ||
node-version: | ||
- 16.x | ||
python-version: | ||
- 3.7 | ||
dotnet: | ||
- 6.0.x | ||
|
||
steps: | ||
- name: Install Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
|
||
- name: Install DotNet | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ matrix.dotnet }} | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Install Pulumi | ||
uses: pulumi/actions@v4 | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Check out the code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-region: ${{ env.AWS_REGION }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
role-duration-seconds: 14400 # 4 hours | ||
role-session-name: pulumi-hugo-examples@githubActions | ||
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} | ||
|
||
- name: Run the tests | ||
run: make test-examples |
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 |
---|---|---|
|
@@ -15,3 +15,4 @@ yarn-error.log | |
themes/default/theme | ||
themes/default/assets | ||
themes/default/layouts | ||
themes/default/static/examples |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
pulumi whoami -v | ||
|
||
pushd themes/default/static/examples | ||
for dir in */; do | ||
pushd $dir | ||
project="$(basename $dir)" | ||
|
||
echo "***" | ||
echo "* $project" | ||
echo "***" | ||
|
||
org="$(pulumi whoami -v --json | jq -r .user)" | ||
stack="dev" | ||
fqsn="${org}/${project}/${stack}" | ||
|
||
# Install dependencies. | ||
pulumi install | ||
|
||
# Destroy any existing stacks. | ||
pulumi cancel --stack $fqsn --yes || true | ||
pulumi destroy --stack $fqsn --yes --refresh --remove || true | ||
|
||
# Delete any existing Docker images -- we want to start fresh. | ||
docker rmi -f $(docker images -aq) || true | ||
|
||
# Create a new stack. | ||
pulumi stack select $fqsn || pulumi stack init $fqsn | ||
pulumi config set aws:region us-west-2 || true | ||
|
||
# Deploy. | ||
|
||
if ["${1}" == "update"]; then | ||
pulumi up --yes | ||
else | ||
pulumi preview | ||
fi | ||
|
||
# Destroy and remove. | ||
pulumi destroy --yes --remove | ||
popd | ||
done | ||
popd |
Oops, something went wrong.