fixing yaml syntax #24
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: Deploy ADL LRS Application (Python) | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- adding-nodejs-tests | ||
jobs: | ||
deploy-staging: | ||
Check failure on line 9 in .github/workflows/cicd.yml GitHub Actions / Deploy ADL LRS Application (Python)Invalid workflow file
|
||
runs-on: ubuntu-latest | ||
environment: staging | ||
needs: | ||
- build-and-test | ||
#- deploy-dev | ||
steps: | ||
- name: Configure SSH | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.ADLNET_STAGING_SSH_KEY }}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
ssh-keyscan "${{ secrets.ADLNET_STAGING_HOST }}" >> ~/.ssh/known_hosts | ||
- name: Deploy code on Staging | ||
run: | | ||
ssh ${{ secrets.ADLNET_STAGING_HOST_USER }}@${{ secrets.ADLNET_STAGING_HOST }} | ||
cd ${{ secrets.ADLNET_STAGING_PROJECT_DIR }} | ||
echo 'Pulling Latest Code from Repository...' | ||
git pull | ||
echo 'Rebuilding Docker Containers..' | ||
sudo docker-compose stop | ||
sudo docker-compose build --no-cache | ||
sudo docker-compose up -d | ||
echo 'deployed successfully on server' | ||
cypress-testing: | ||
name: Cypress run | ||
environment: staging | ||
needs: | ||
- deploy-staging | ||
runs-on: ubuntu-22.04 | ||
env: | ||
LRS_USERNAME: ${{ secrets.ADLNET_STAGING_LRS_USERNAME }} | ||
LRS_PASSWORD: ${{ secrets.ADLNET_STAGING_LRS_PASSWORD }} | ||
LRS_HOST_URL: ${{ secrets.ADLNET_STAGING_LRS_HOST_URL }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Cypress run | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
project: ${{ secrets.ADLNET_STAGING_PROJECT_DIR }}/tests/cypress | ||
conformance-testing: | ||
runs-on: ubuntu-latest | ||
environment: staging | ||
needs: | ||
- deploy-staging | ||
env: | ||
LRS_USERNAME: ${{ secrets.ADLNET_STAGING_LRS_USERNAME }} | ||
LRS_PASSWORD: ${{ secrets.ADLNET_STAGING_LRS_PASSWORD }} | ||
LRS_ENDPOINT: ${{ secrets.ADLNET_STAGING_LRS_ENDPOINT }} | ||
steps: | ||
- name: Setup NodeJS | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- name: Clone the CTS Repo | ||
uses: GuillaumeFalourd/clone-github-repo-action@main | ||
with: | ||
owner: adlnet | ||
repository: lrs-conformance-test-suite | ||
- name: Run LRS Conformance Suite | ||
run: | | ||
cd lrs-conformance-test-suite | ||
npm install | ||
node ./bin/console_runner.js | ||
--basicAuth \ | ||
--authUser $LRS_ADMIN_USER \ | ||
--authPassword $LRS_ADMIN_PASS \ | ||
--endpoint "$LRS_ENDPOINT |