-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added info on #1 * Issue #5 work * Resolves #8 * Fixes #10. * Added tests. * Added automatic deployment
- Loading branch information
Showing
23 changed files
with
29,062 additions
and
22,211 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
This file was deleted.
Oops, something went wrong.
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,72 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
workflow_call: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [17.x] | ||
|
||
steps: | ||
- run: git config --global core.autocrlf false | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
|
||
- name: Install StoreDown dependencies | ||
run: npm ci | ||
|
||
- name: Run linter | ||
run: npm run lint | ||
|
||
- name: Run e2e tests | ||
id: tests | ||
run: npx vue-cli-service test:e2e --headless | ||
|
||
- name: Get test screenshots | ||
if: failure() && steps.tests.outcome == 'failure' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: testScreenshots | ||
path: | | ||
tests/e2e/screenshots | ||
- name: Get test videos | ||
if: failure() && steps.tests.outcome == 'failure' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: testVideo | ||
path: | | ||
tests/e2e/videos | ||
- name: Build StoreDown | ||
run: npm run build | ||
|
||
- name: Build artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
- name: Upload release files | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: release | ||
path: | | ||
package.json | ||
Dockerfile | ||
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,62 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Retrieve build | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
path: ./dist | ||
- name: Retrieve release files | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: release | ||
path: ./ | ||
- name: Install jq | ||
run: sudo apt-get install -y jq | ||
#Based on https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions | ||
- name: Get version | ||
run: echo "RELEASE_VERSION=$(jq -r .version ./package.json)" >> $GITHUB_ENV | ||
- name: Test | ||
run: | | ||
echo $RELEASE_VERSION | ||
ls -lt dist | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: foxusa/storedown:latest,foxusa/storedown:${{ env.RELEASE_VERSION }} | ||
|
||
- name: Zip up release | ||
run: cd dist && zip -r v${{ env.RELEASE_VERSION }}.zip . | ||
|
||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: StoreDown v${{ env.RELEASE_VERSION }} | ||
tag_name: v${{ env.RELEASE_VERSION }} | ||
files: | | ||
dist/v${{ env.RELEASE_VERSION }}.zip | ||
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 |
---|---|---|
|
@@ -4,6 +4,8 @@ node_modules | |
|
||
/tests/e2e/reports/ | ||
selenium-debug.log | ||
screenshots | ||
videos | ||
|
||
# local env files | ||
.env.local | ||
|
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.