Skip to content

Commit

Permalink
Merge pull request #29 from simplificator/rebuild-as-compose-action
Browse files Browse the repository at this point in the history
Rewrite action as a composite action
  • Loading branch information
andyundso authored Mar 26, 2024
2 parents c27ba81 + 1bbb661 commit 39723b7
Show file tree
Hide file tree
Showing 27 changed files with 106 additions and 11,083 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

83 changes: 0 additions & 83 deletions .github/linters/.eslintrc.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .github/linters/.markdown-lint.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/linters/.yaml-lint.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/linters/tsconfig.json

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/check-dist.yml

This file was deleted.

48 changes: 25 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,46 @@ permissions:
contents: read

jobs:
test-typescript:
name: TypeScript Tests
test:
name: Tests
runs-on: ubuntu-latest

steps:
# cloning into "root" does not work when trying to call the action from itself
# inspired by Microsoft: https://github.com/microsoft/action-python/blob/c8ec939994d7ed2ec77b7bbe59ed5f5b72fb5607/.github/workflows/test.yml#L21
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm

- name: Install Dependencies
id: npm-ci
run: npm ci

- name: Check Format
id: npm-format-check
run: npm run format:check

- name: Lint
id: npm-lint
run: npm run lint
path: action
clean: true

- name: Run test server
run: |
docker compose build
docker compose up &
working-directory: action

- name: Add SSH identity of test server to known hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan -t rsa -p 2222 127.0.0.1 >> ~/.ssh/known_hosts
- name: Test
id: npm-ci-test
run: npm run ci-test
uses: ./action
with:
compose-file: action/docker-compose.test.yml
stack-name: david
ssh-user-at-host: [email protected]
ssh-port: 2222

- name: Check if test application is available
run: |
response=$(curl -s 'http://127.0.0.1:8888')
if echo "$response" | grep -q "Hello World"; then
echo "Pattern matched."
exit 0
else
echo "Pattern not matched."
exit 1
fi
shell: bash
48 changes: 0 additions & 48 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

1 change: 0 additions & 1 deletion .node-version

This file was deleted.

1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

16 changes: 0 additions & 16 deletions .prettierrc.json

This file was deleted.

4 changes: 0 additions & 4 deletions CODEOWNERS

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright GitHub
Copyright (c) 2024 Simplificator AG

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 39723b7

Please sign in to comment.